/**
 * @file flip_kindergarten.c
 *
 * This module deals with flipping discs.
 *
 * A function is provided for each square of the board. These functions are
 * gathered into an array of functions, so that a fast access to each function
 * is allowed. The generic form of the function take as input the player and
 * the opponent bitboards and return the flipped squares into a bitboard.
 *
 * Given the following notation:
 *  - x = square where we play,
 *  - P = player's disc pattern,
 *  - O = opponent's disc pattern,
 * the basic principle is to read into an array the result of a move. Doing
 * this is easier for a single line ; so we can use arrays of the form:
 *  - ARRAY[x][8-bits disc pattern].
 * The problem is thus to convert any line of a 64-bits disc pattern into an
 * 8-bits disc pattern. A fast way to do this is to select the right line,
 * with a bit-mask, to gather the masked-bits into a continuous set by a simple
 * multiplication and to right-shift the result to scale it into a number
 * between 0 and 255.
 * Once we get our 8-bits disc patterns,a first array (OUTFLANK) is used to
 * get the player's discs that surround the opponent discs:
 *  - outflank = OUTFLANK[x][O] & P
 * The result is then used as an index to access a second array giving the
 * flipped discs according to the surrounding player's discs:
 *  - flipped = FLIPPED[x][outflank].
 * Finally, a precomputed array transform the 8-bits disc pattern back into a
 * 64-bits disc pattern, and the flipped squares for each line are gathered and
 * returned to generate moves.
 *
 * File automatically generated
 * @date 1998 - 2013
 * @author Richard Delorme
 * @version 4.4
 */

/** outflank array */
const unsigned char OUTFLANK[8][64] = {
	{
		0x00, 0x04, 0x00, 0x08, 0x00, 0x04, 0x00, 0x10, 0x00, 0x04, 0x00, 0x08, 0x00, 0x04, 0x00, 0x20,
		0x00, 0x04, 0x00, 0x08, 0x00, 0x04, 0x00, 0x10, 0x00, 0x04, 0x00, 0x08, 0x00, 0x04, 0x00, 0x40,
		0x00, 0x04, 0x00, 0x08, 0x00, 0x04, 0x00, 0x10, 0x00, 0x04, 0x00, 0x08, 0x00, 0x04, 0x00, 0x20,
		0x00, 0x04, 0x00, 0x08, 0x00, 0x04, 0x00, 0x10, 0x00, 0x04, 0x00, 0x08, 0x00, 0x04, 0x00, 0x80,
	},
	{
		0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00,
		0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x40, 0x00,
		0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00,
		0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x80, 0x00,
	},
	{
		0x00, 0x01, 0x00, 0x00, 0x10, 0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x20, 0x21, 0x00, 0x00,
		0x00, 0x01, 0x00, 0x00, 0x10, 0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x40, 0x41, 0x00, 0x00,
		0x00, 0x01, 0x00, 0x00, 0x10, 0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x20, 0x21, 0x00, 0x00,
		0x00, 0x01, 0x00, 0x00, 0x10, 0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x80, 0x81, 0x00, 0x00,
	},
	{
		0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x22, 0x21, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x42, 0x41, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x22, 0x21, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x82, 0x81, 0x00, 0x00, 0x00, 0x00,
	},
	{
		0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x40, 0x40, 0x40, 0x40, 0x44, 0x44, 0x42, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x80, 0x80, 0x80, 0x80, 0x84, 0x84, 0x82, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	},
	{
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x02, 0x01,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x88, 0x88, 0x88, 0x88, 0x84, 0x84, 0x82, 0x81,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	},
	{
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x02, 0x01,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	},
	{
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
		0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x02, 0x01,
	},
};

/** flip array */
const unsigned char FLIPPED[8][144] = {
	{
		0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	},
	{
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	},
	{
		0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x1c, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x3c, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	},
	{
		0x00, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x08, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x18, 0x1b, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x38, 0x3b, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	},
	{
		0x00, 0x07, 0x06, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x10, 0x17, 0x16, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x30, 0x37, 0x36, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	},
	{
		0x00, 0x0f, 0x0e, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x20, 0x2f, 0x2e, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	},
	{
		0x00, 0x1f, 0x1e, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	},
	{
		0x00, 0x3f, 0x3e, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	},
};

/** conversion from an 8-bit line to the B1-G1- line */
unsigned long long B1G1[64] = {
		0x0000000000000000ULL, 0x0000000000000002ULL, 0x0000000000000004ULL, 0x0000000000000006ULL, 0x0000000000000008ULL, 0x000000000000000aULL, 0x000000000000000cULL, 0x000000000000000eULL,
		0x0000000000000010ULL, 0x0000000000000012ULL, 0x0000000000000014ULL, 0x0000000000000016ULL, 0x0000000000000018ULL, 0x000000000000001aULL, 0x000000000000001cULL, 0x000000000000001eULL,
		0x0000000000000020ULL, 0x0000000000000022ULL, 0x0000000000000024ULL, 0x0000000000000026ULL, 0x0000000000000028ULL, 0x000000000000002aULL, 0x000000000000002cULL, 0x000000000000002eULL,
		0x0000000000000030ULL, 0x0000000000000032ULL, 0x0000000000000034ULL, 0x0000000000000036ULL, 0x0000000000000038ULL, 0x000000000000003aULL, 0x000000000000003cULL, 0x000000000000003eULL,
		0x0000000000000040ULL, 0x0000000000000042ULL, 0x0000000000000044ULL, 0x0000000000000046ULL, 0x0000000000000048ULL, 0x000000000000004aULL, 0x000000000000004cULL, 0x000000000000004eULL,
		0x0000000000000050ULL, 0x0000000000000052ULL, 0x0000000000000054ULL, 0x0000000000000056ULL, 0x0000000000000058ULL, 0x000000000000005aULL, 0x000000000000005cULL, 0x000000000000005eULL,
		0x0000000000000060ULL, 0x0000000000000062ULL, 0x0000000000000064ULL, 0x0000000000000066ULL, 0x0000000000000068ULL, 0x000000000000006aULL, 0x000000000000006cULL, 0x000000000000006eULL,
		0x0000000000000070ULL, 0x0000000000000072ULL, 0x0000000000000074ULL, 0x0000000000000076ULL, 0x0000000000000078ULL, 0x000000000000007aULL, 0x000000000000007cULL, 0x000000000000007eULL,
};

/** conversion from an 8-bit line to the B2-G2- line */
unsigned long long B2G2[64] = {
		0x0000000000000000ULL, 0x0000000000000200ULL, 0x0000000000000400ULL, 0x0000000000000600ULL, 0x0000000000000800ULL, 0x0000000000000a00ULL, 0x0000000000000c00ULL, 0x0000000000000e00ULL,
		0x0000000000001000ULL, 0x0000000000001200ULL, 0x0000000000001400ULL, 0x0000000000001600ULL, 0x0000000000001800ULL, 0x0000000000001a00ULL, 0x0000000000001c00ULL, 0x0000000000001e00ULL,
		0x0000000000002000ULL, 0x0000000000002200ULL, 0x0000000000002400ULL, 0x0000000000002600ULL, 0x0000000000002800ULL, 0x0000000000002a00ULL, 0x0000000000002c00ULL, 0x0000000000002e00ULL,
		0x0000000000003000ULL, 0x0000000000003200ULL, 0x0000000000003400ULL, 0x0000000000003600ULL, 0x0000000000003800ULL, 0x0000000000003a00ULL, 0x0000000000003c00ULL, 0x0000000000003e00ULL,
		0x0000000000004000ULL, 0x0000000000004200ULL, 0x0000000000004400ULL, 0x0000000000004600ULL, 0x0000000000004800ULL, 0x0000000000004a00ULL, 0x0000000000004c00ULL, 0x0000000000004e00ULL,
		0x0000000000005000ULL, 0x0000000000005200ULL, 0x0000000000005400ULL, 0x0000000000005600ULL, 0x0000000000005800ULL, 0x0000000000005a00ULL, 0x0000000000005c00ULL, 0x0000000000005e00ULL,
		0x0000000000006000ULL, 0x0000000000006200ULL, 0x0000000000006400ULL, 0x0000000000006600ULL, 0x0000000000006800ULL, 0x0000000000006a00ULL, 0x0000000000006c00ULL, 0x0000000000006e00ULL,
		0x0000000000007000ULL, 0x0000000000007200ULL, 0x0000000000007400ULL, 0x0000000000007600ULL, 0x0000000000007800ULL, 0x0000000000007a00ULL, 0x0000000000007c00ULL, 0x0000000000007e00ULL,
};

/** conversion from an 8-bit line to the B3-G3- line */
unsigned long long B3G3[64] = {
		0x0000000000000000ULL, 0x0000000000020000ULL, 0x0000000000040000ULL, 0x0000000000060000ULL, 0x0000000000080000ULL, 0x00000000000a0000ULL, 0x00000000000c0000ULL, 0x00000000000e0000ULL,
		0x0000000000100000ULL, 0x0000000000120000ULL, 0x0000000000140000ULL, 0x0000000000160000ULL, 0x0000000000180000ULL, 0x00000000001a0000ULL, 0x00000000001c0000ULL, 0x00000000001e0000ULL,
		0x0000000000200000ULL, 0x0000000000220000ULL, 0x0000000000240000ULL, 0x0000000000260000ULL, 0x0000000000280000ULL, 0x00000000002a0000ULL, 0x00000000002c0000ULL, 0x00000000002e0000ULL,
		0x0000000000300000ULL, 0x0000000000320000ULL, 0x0000000000340000ULL, 0x0000000000360000ULL, 0x0000000000380000ULL, 0x00000000003a0000ULL, 0x00000000003c0000ULL, 0x00000000003e0000ULL,
		0x0000000000400000ULL, 0x0000000000420000ULL, 0x0000000000440000ULL, 0x0000000000460000ULL, 0x0000000000480000ULL, 0x00000000004a0000ULL, 0x00000000004c0000ULL, 0x00000000004e0000ULL,
		0x0000000000500000ULL, 0x0000000000520000ULL, 0x0000000000540000ULL, 0x0000000000560000ULL, 0x0000000000580000ULL, 0x00000000005a0000ULL, 0x00000000005c0000ULL, 0x00000000005e0000ULL,
		0x0000000000600000ULL, 0x0000000000620000ULL, 0x0000000000640000ULL, 0x0000000000660000ULL, 0x0000000000680000ULL, 0x00000000006a0000ULL, 0x00000000006c0000ULL, 0x00000000006e0000ULL,
		0x0000000000700000ULL, 0x0000000000720000ULL, 0x0000000000740000ULL, 0x0000000000760000ULL, 0x0000000000780000ULL, 0x00000000007a0000ULL, 0x00000000007c0000ULL, 0x00000000007e0000ULL,
};

/** conversion from an 8-bit line to the B4-G4- line */
unsigned long long B4G4[64] = {
		0x0000000000000000ULL, 0x0000000002000000ULL, 0x0000000004000000ULL, 0x0000000006000000ULL, 0x0000000008000000ULL, 0x000000000a000000ULL, 0x000000000c000000ULL, 0x000000000e000000ULL,
		0x0000000010000000ULL, 0x0000000012000000ULL, 0x0000000014000000ULL, 0x0000000016000000ULL, 0x0000000018000000ULL, 0x000000001a000000ULL, 0x000000001c000000ULL, 0x000000001e000000ULL,
		0x0000000020000000ULL, 0x0000000022000000ULL, 0x0000000024000000ULL, 0x0000000026000000ULL, 0x0000000028000000ULL, 0x000000002a000000ULL, 0x000000002c000000ULL, 0x000000002e000000ULL,
		0x0000000030000000ULL, 0x0000000032000000ULL, 0x0000000034000000ULL, 0x0000000036000000ULL, 0x0000000038000000ULL, 0x000000003a000000ULL, 0x000000003c000000ULL, 0x000000003e000000ULL,
		0x0000000040000000ULL, 0x0000000042000000ULL, 0x0000000044000000ULL, 0x0000000046000000ULL, 0x0000000048000000ULL, 0x000000004a000000ULL, 0x000000004c000000ULL, 0x000000004e000000ULL,
		0x0000000050000000ULL, 0x0000000052000000ULL, 0x0000000054000000ULL, 0x0000000056000000ULL, 0x0000000058000000ULL, 0x000000005a000000ULL, 0x000000005c000000ULL, 0x000000005e000000ULL,
		0x0000000060000000ULL, 0x0000000062000000ULL, 0x0000000064000000ULL, 0x0000000066000000ULL, 0x0000000068000000ULL, 0x000000006a000000ULL, 0x000000006c000000ULL, 0x000000006e000000ULL,
		0x0000000070000000ULL, 0x0000000072000000ULL, 0x0000000074000000ULL, 0x0000000076000000ULL, 0x0000000078000000ULL, 0x000000007a000000ULL, 0x000000007c000000ULL, 0x000000007e000000ULL,
};

/** conversion from an 8-bit line to the B5-G5- line */
unsigned long long B5G5[64] = {
		0x0000000000000000ULL, 0x0000000200000000ULL, 0x0000000400000000ULL, 0x0000000600000000ULL, 0x0000000800000000ULL, 0x0000000a00000000ULL, 0x0000000c00000000ULL, 0x0000000e00000000ULL,
		0x0000001000000000ULL, 0x0000001200000000ULL, 0x0000001400000000ULL, 0x0000001600000000ULL, 0x0000001800000000ULL, 0x0000001a00000000ULL, 0x0000001c00000000ULL, 0x0000001e00000000ULL,
		0x0000002000000000ULL, 0x0000002200000000ULL, 0x0000002400000000ULL, 0x0000002600000000ULL, 0x0000002800000000ULL, 0x0000002a00000000ULL, 0x0000002c00000000ULL, 0x0000002e00000000ULL,
		0x0000003000000000ULL, 0x0000003200000000ULL, 0x0000003400000000ULL, 0x0000003600000000ULL, 0x0000003800000000ULL, 0x0000003a00000000ULL, 0x0000003c00000000ULL, 0x0000003e00000000ULL,
		0x0000004000000000ULL, 0x0000004200000000ULL, 0x0000004400000000ULL, 0x0000004600000000ULL, 0x0000004800000000ULL, 0x0000004a00000000ULL, 0x0000004c00000000ULL, 0x0000004e00000000ULL,
		0x0000005000000000ULL, 0x0000005200000000ULL, 0x0000005400000000ULL, 0x0000005600000000ULL, 0x0000005800000000ULL, 0x0000005a00000000ULL, 0x0000005c00000000ULL, 0x0000005e00000000ULL,
		0x0000006000000000ULL, 0x0000006200000000ULL, 0x0000006400000000ULL, 0x0000006600000000ULL, 0x0000006800000000ULL, 0x0000006a00000000ULL, 0x0000006c00000000ULL, 0x0000006e00000000ULL,
		0x0000007000000000ULL, 0x0000007200000000ULL, 0x0000007400000000ULL, 0x0000007600000000ULL, 0x0000007800000000ULL, 0x0000007a00000000ULL, 0x0000007c00000000ULL, 0x0000007e00000000ULL,
};

/** conversion from an 8-bit line to the B6-G6- line */
unsigned long long B6G6[64] = {
		0x0000000000000000ULL, 0x0000020000000000ULL, 0x0000040000000000ULL, 0x0000060000000000ULL, 0x0000080000000000ULL, 0x00000a0000000000ULL, 0x00000c0000000000ULL, 0x00000e0000000000ULL,
		0x0000100000000000ULL, 0x0000120000000000ULL, 0x0000140000000000ULL, 0x0000160000000000ULL, 0x0000180000000000ULL, 0x00001a0000000000ULL, 0x00001c0000000000ULL, 0x00001e0000000000ULL,
		0x0000200000000000ULL, 0x0000220000000000ULL, 0x0000240000000000ULL, 0x0000260000000000ULL, 0x0000280000000000ULL, 0x00002a0000000000ULL, 0x00002c0000000000ULL, 0x00002e0000000000ULL,
		0x0000300000000000ULL, 0x0000320000000000ULL, 0x0000340000000000ULL, 0x0000360000000000ULL, 0x0000380000000000ULL, 0x00003a0000000000ULL, 0x00003c0000000000ULL, 0x00003e0000000000ULL,
		0x0000400000000000ULL, 0x0000420000000000ULL, 0x0000440000000000ULL, 0x0000460000000000ULL, 0x0000480000000000ULL, 0x00004a0000000000ULL, 0x00004c0000000000ULL, 0x00004e0000000000ULL,
		0x0000500000000000ULL, 0x0000520000000000ULL, 0x0000540000000000ULL, 0x0000560000000000ULL, 0x0000580000000000ULL, 0x00005a0000000000ULL, 0x00005c0000000000ULL, 0x00005e0000000000ULL,
		0x0000600000000000ULL, 0x0000620000000000ULL, 0x0000640000000000ULL, 0x0000660000000000ULL, 0x0000680000000000ULL, 0x00006a0000000000ULL, 0x00006c0000000000ULL, 0x00006e0000000000ULL,
		0x0000700000000000ULL, 0x0000720000000000ULL, 0x0000740000000000ULL, 0x0000760000000000ULL, 0x0000780000000000ULL, 0x00007a0000000000ULL, 0x00007c0000000000ULL, 0x00007e0000000000ULL,
};

/** conversion from an 8-bit line to the B7-G7- line */
unsigned long long B7G7[64] = {
		0x0000000000000000ULL, 0x0002000000000000ULL, 0x0004000000000000ULL, 0x0006000000000000ULL, 0x0008000000000000ULL, 0x000a000000000000ULL, 0x000c000000000000ULL, 0x000e000000000000ULL,
		0x0010000000000000ULL, 0x0012000000000000ULL, 0x0014000000000000ULL, 0x0016000000000000ULL, 0x0018000000000000ULL, 0x001a000000000000ULL, 0x001c000000000000ULL, 0x001e000000000000ULL,
		0x0020000000000000ULL, 0x0022000000000000ULL, 0x0024000000000000ULL, 0x0026000000000000ULL, 0x0028000000000000ULL, 0x002a000000000000ULL, 0x002c000000000000ULL, 0x002e000000000000ULL,
		0x0030000000000000ULL, 0x0032000000000000ULL, 0x0034000000000000ULL, 0x0036000000000000ULL, 0x0038000000000000ULL, 0x003a000000000000ULL, 0x003c000000000000ULL, 0x003e000000000000ULL,
		0x0040000000000000ULL, 0x0042000000000000ULL, 0x0044000000000000ULL, 0x0046000000000000ULL, 0x0048000000000000ULL, 0x004a000000000000ULL, 0x004c000000000000ULL, 0x004e000000000000ULL,
		0x0050000000000000ULL, 0x0052000000000000ULL, 0x0054000000000000ULL, 0x0056000000000000ULL, 0x0058000000000000ULL, 0x005a000000000000ULL, 0x005c000000000000ULL, 0x005e000000000000ULL,
		0x0060000000000000ULL, 0x0062000000000000ULL, 0x0064000000000000ULL, 0x0066000000000000ULL, 0x0068000000000000ULL, 0x006a000000000000ULL, 0x006c000000000000ULL, 0x006e000000000000ULL,
		0x0070000000000000ULL, 0x0072000000000000ULL, 0x0074000000000000ULL, 0x0076000000000000ULL, 0x0078000000000000ULL, 0x007a000000000000ULL, 0x007c000000000000ULL, 0x007e000000000000ULL,
};

/** conversion from an 8-bit line to the B8-G8- line */
unsigned long long B8G8[64] = {
		0x0000000000000000ULL, 0x0200000000000000ULL, 0x0400000000000000ULL, 0x0600000000000000ULL, 0x0800000000000000ULL, 0x0a00000000000000ULL, 0x0c00000000000000ULL, 0x0e00000000000000ULL,
		0x1000000000000000ULL, 0x1200000000000000ULL, 0x1400000000000000ULL, 0x1600000000000000ULL, 0x1800000000000000ULL, 0x1a00000000000000ULL, 0x1c00000000000000ULL, 0x1e00000000000000ULL,
		0x2000000000000000ULL, 0x2200000000000000ULL, 0x2400000000000000ULL, 0x2600000000000000ULL, 0x2800000000000000ULL, 0x2a00000000000000ULL, 0x2c00000000000000ULL, 0x2e00000000000000ULL,
		0x3000000000000000ULL, 0x3200000000000000ULL, 0x3400000000000000ULL, 0x3600000000000000ULL, 0x3800000000000000ULL, 0x3a00000000000000ULL, 0x3c00000000000000ULL, 0x3e00000000000000ULL,
		0x4000000000000000ULL, 0x4200000000000000ULL, 0x4400000000000000ULL, 0x4600000000000000ULL, 0x4800000000000000ULL, 0x4a00000000000000ULL, 0x4c00000000000000ULL, 0x4e00000000000000ULL,
		0x5000000000000000ULL, 0x5200000000000000ULL, 0x5400000000000000ULL, 0x5600000000000000ULL, 0x5800000000000000ULL, 0x5a00000000000000ULL, 0x5c00000000000000ULL, 0x5e00000000000000ULL,
		0x6000000000000000ULL, 0x6200000000000000ULL, 0x6400000000000000ULL, 0x6600000000000000ULL, 0x6800000000000000ULL, 0x6a00000000000000ULL, 0x6c00000000000000ULL, 0x6e00000000000000ULL,
		0x7000000000000000ULL, 0x7200000000000000ULL, 0x7400000000000000ULL, 0x7600000000000000ULL, 0x7800000000000000ULL, 0x7a00000000000000ULL, 0x7c00000000000000ULL, 0x7e00000000000000ULL,
};

/** conversion from an 8-bit line to the A2-A7- line */
unsigned long long A2A7[64] = {
		0x0000000000000000ULL, 0x0000000000000100ULL, 0x0000000000010000ULL, 0x0000000000010100ULL, 0x0000000001000000ULL, 0x0000000001000100ULL, 0x0000000001010000ULL, 0x0000000001010100ULL,
		0x0000000100000000ULL, 0x0000000100000100ULL, 0x0000000100010000ULL, 0x0000000100010100ULL, 0x0000000101000000ULL, 0x0000000101000100ULL, 0x0000000101010000ULL, 0x0000000101010100ULL,
		0x0000010000000000ULL, 0x0000010000000100ULL, 0x0000010000010000ULL, 0x0000010000010100ULL, 0x0000010001000000ULL, 0x0000010001000100ULL, 0x0000010001010000ULL, 0x0000010001010100ULL,
		0x0000010100000000ULL, 0x0000010100000100ULL, 0x0000010100010000ULL, 0x0000010100010100ULL, 0x0000010101000000ULL, 0x0000010101000100ULL, 0x0000010101010000ULL, 0x0000010101010100ULL,
		0x0001000000000000ULL, 0x0001000000000100ULL, 0x0001000000010000ULL, 0x0001000000010100ULL, 0x0001000001000000ULL, 0x0001000001000100ULL, 0x0001000001010000ULL, 0x0001000001010100ULL,
		0x0001000100000000ULL, 0x0001000100000100ULL, 0x0001000100010000ULL, 0x0001000100010100ULL, 0x0001000101000000ULL, 0x0001000101000100ULL, 0x0001000101010000ULL, 0x0001000101010100ULL,
		0x0001010000000000ULL, 0x0001010000000100ULL, 0x0001010000010000ULL, 0x0001010000010100ULL, 0x0001010001000000ULL, 0x0001010001000100ULL, 0x0001010001010000ULL, 0x0001010001010100ULL,
		0x0001010100000000ULL, 0x0001010100000100ULL, 0x0001010100010000ULL, 0x0001010100010100ULL, 0x0001010101000000ULL, 0x0001010101000100ULL, 0x0001010101010000ULL, 0x0001010101010100ULL,
};

/** conversion from an 8-bit line to the B2-B7- line */
unsigned long long B2B7[64] = {
		0x0000000000000000ULL, 0x0000000000000200ULL, 0x0000000000020000ULL, 0x0000000000020200ULL, 0x0000000002000000ULL, 0x0000000002000200ULL, 0x0000000002020000ULL, 0x0000000002020200ULL,
		0x0000000200000000ULL, 0x0000000200000200ULL, 0x0000000200020000ULL, 0x0000000200020200ULL, 0x0000000202000000ULL, 0x0000000202000200ULL, 0x0000000202020000ULL, 0x0000000202020200ULL,
		0x0000020000000000ULL, 0x0000020000000200ULL, 0x0000020000020000ULL, 0x0000020000020200ULL, 0x0000020002000000ULL, 0x0000020002000200ULL, 0x0000020002020000ULL, 0x0000020002020200ULL,
		0x0000020200000000ULL, 0x0000020200000200ULL, 0x0000020200020000ULL, 0x0000020200020200ULL, 0x0000020202000000ULL, 0x0000020202000200ULL, 0x0000020202020000ULL, 0x0000020202020200ULL,
		0x0002000000000000ULL, 0x0002000000000200ULL, 0x0002000000020000ULL, 0x0002000000020200ULL, 0x0002000002000000ULL, 0x0002000002000200ULL, 0x0002000002020000ULL, 0x0002000002020200ULL,
		0x0002000200000000ULL, 0x0002000200000200ULL, 0x0002000200020000ULL, 0x0002000200020200ULL, 0x0002000202000000ULL, 0x0002000202000200ULL, 0x0002000202020000ULL, 0x0002000202020200ULL,
		0x0002020000000000ULL, 0x0002020000000200ULL, 0x0002020000020000ULL, 0x0002020000020200ULL, 0x0002020002000000ULL, 0x0002020002000200ULL, 0x0002020002020000ULL, 0x0002020002020200ULL,
		0x0002020200000000ULL, 0x0002020200000200ULL, 0x0002020200020000ULL, 0x0002020200020200ULL, 0x0002020202000000ULL, 0x0002020202000200ULL, 0x0002020202020000ULL, 0x0002020202020200ULL,
};

/** conversion from an 8-bit line to the C2-C7- line */
unsigned long long C2C7[64] = {
		0x0000000000000000ULL, 0x0000000000000400ULL, 0x0000000000040000ULL, 0x0000000000040400ULL, 0x0000000004000000ULL, 0x0000000004000400ULL, 0x0000000004040000ULL, 0x0000000004040400ULL,
		0x0000000400000000ULL, 0x0000000400000400ULL, 0x0000000400040000ULL, 0x0000000400040400ULL, 0x0000000404000000ULL, 0x0000000404000400ULL, 0x0000000404040000ULL, 0x0000000404040400ULL,
		0x0000040000000000ULL, 0x0000040000000400ULL, 0x0000040000040000ULL, 0x0000040000040400ULL, 0x0000040004000000ULL, 0x0000040004000400ULL, 0x0000040004040000ULL, 0x0000040004040400ULL,
		0x0000040400000000ULL, 0x0000040400000400ULL, 0x0000040400040000ULL, 0x0000040400040400ULL, 0x0000040404000000ULL, 0x0000040404000400ULL, 0x0000040404040000ULL, 0x0000040404040400ULL,
		0x0004000000000000ULL, 0x0004000000000400ULL, 0x0004000000040000ULL, 0x0004000000040400ULL, 0x0004000004000000ULL, 0x0004000004000400ULL, 0x0004000004040000ULL, 0x0004000004040400ULL,
		0x0004000400000000ULL, 0x0004000400000400ULL, 0x0004000400040000ULL, 0x0004000400040400ULL, 0x0004000404000000ULL, 0x0004000404000400ULL, 0x0004000404040000ULL, 0x0004000404040400ULL,
		0x0004040000000000ULL, 0x0004040000000400ULL, 0x0004040000040000ULL, 0x0004040000040400ULL, 0x0004040004000000ULL, 0x0004040004000400ULL, 0x0004040004040000ULL, 0x0004040004040400ULL,
		0x0004040400000000ULL, 0x0004040400000400ULL, 0x0004040400040000ULL, 0x0004040400040400ULL, 0x0004040404000000ULL, 0x0004040404000400ULL, 0x0004040404040000ULL, 0x0004040404040400ULL,
};

/** conversion from an 8-bit line to the D2-D7- line */
unsigned long long D2D7[64] = {
		0x0000000000000000ULL, 0x0000000000000800ULL, 0x0000000000080000ULL, 0x0000000000080800ULL, 0x0000000008000000ULL, 0x0000000008000800ULL, 0x0000000008080000ULL, 0x0000000008080800ULL,
		0x0000000800000000ULL, 0x0000000800000800ULL, 0x0000000800080000ULL, 0x0000000800080800ULL, 0x0000000808000000ULL, 0x0000000808000800ULL, 0x0000000808080000ULL, 0x0000000808080800ULL,
		0x0000080000000000ULL, 0x0000080000000800ULL, 0x0000080000080000ULL, 0x0000080000080800ULL, 0x0000080008000000ULL, 0x0000080008000800ULL, 0x0000080008080000ULL, 0x0000080008080800ULL,
		0x0000080800000000ULL, 0x0000080800000800ULL, 0x0000080800080000ULL, 0x0000080800080800ULL, 0x0000080808000000ULL, 0x0000080808000800ULL, 0x0000080808080000ULL, 0x0000080808080800ULL,
		0x0008000000000000ULL, 0x0008000000000800ULL, 0x0008000000080000ULL, 0x0008000000080800ULL, 0x0008000008000000ULL, 0x0008000008000800ULL, 0x0008000008080000ULL, 0x0008000008080800ULL,
		0x0008000800000000ULL, 0x0008000800000800ULL, 0x0008000800080000ULL, 0x0008000800080800ULL, 0x0008000808000000ULL, 0x0008000808000800ULL, 0x0008000808080000ULL, 0x0008000808080800ULL,
		0x0008080000000000ULL, 0x0008080000000800ULL, 0x0008080000080000ULL, 0x0008080000080800ULL, 0x0008080008000000ULL, 0x0008080008000800ULL, 0x0008080008080000ULL, 0x0008080008080800ULL,
		0x0008080800000000ULL, 0x0008080800000800ULL, 0x0008080800080000ULL, 0x0008080800080800ULL, 0x0008080808000000ULL, 0x0008080808000800ULL, 0x0008080808080000ULL, 0x0008080808080800ULL,
};

/** conversion from an 8-bit line to the E2-E7- line */
unsigned long long E2E7[64] = {
		0x0000000000000000ULL, 0x0000000000001000ULL, 0x0000000000100000ULL, 0x0000000000101000ULL, 0x0000000010000000ULL, 0x0000000010001000ULL, 0x0000000010100000ULL, 0x0000000010101000ULL,
		0x0000001000000000ULL, 0x0000001000001000ULL, 0x0000001000100000ULL, 0x0000001000101000ULL, 0x0000001010000000ULL, 0x0000001010001000ULL, 0x0000001010100000ULL, 0x0000001010101000ULL,
		0x0000100000000000ULL, 0x0000100000001000ULL, 0x0000100000100000ULL, 0x0000100000101000ULL, 0x0000100010000000ULL, 0x0000100010001000ULL, 0x0000100010100000ULL, 0x0000100010101000ULL,
		0x0000101000000000ULL, 0x0000101000001000ULL, 0x0000101000100000ULL, 0x0000101000101000ULL, 0x0000101010000000ULL, 0x0000101010001000ULL, 0x0000101010100000ULL, 0x0000101010101000ULL,
		0x0010000000000000ULL, 0x0010000000001000ULL, 0x0010000000100000ULL, 0x0010000000101000ULL, 0x0010000010000000ULL, 0x0010000010001000ULL, 0x0010000010100000ULL, 0x0010000010101000ULL,
		0x0010001000000000ULL, 0x0010001000001000ULL, 0x0010001000100000ULL, 0x0010001000101000ULL, 0x0010001010000000ULL, 0x0010001010001000ULL, 0x0010001010100000ULL, 0x0010001010101000ULL,
		0x0010100000000000ULL, 0x0010100000001000ULL, 0x0010100000100000ULL, 0x0010100000101000ULL, 0x0010100010000000ULL, 0x0010100010001000ULL, 0x0010100010100000ULL, 0x0010100010101000ULL,
		0x0010101000000000ULL, 0x0010101000001000ULL, 0x0010101000100000ULL, 0x0010101000101000ULL, 0x0010101010000000ULL, 0x0010101010001000ULL, 0x0010101010100000ULL, 0x0010101010101000ULL,
};

/** conversion from an 8-bit line to the F2-F7- line */
unsigned long long F2F7[64] = {
		0x0000000000000000ULL, 0x0000000000002000ULL, 0x0000000000200000ULL, 0x0000000000202000ULL, 0x0000000020000000ULL, 0x0000000020002000ULL, 0x0000000020200000ULL, 0x0000000020202000ULL,
		0x0000002000000000ULL, 0x0000002000002000ULL, 0x0000002000200000ULL, 0x0000002000202000ULL, 0x0000002020000000ULL, 0x0000002020002000ULL, 0x0000002020200000ULL, 0x0000002020202000ULL,
		0x0000200000000000ULL, 0x0000200000002000ULL, 0x0000200000200000ULL, 0x0000200000202000ULL, 0x0000200020000000ULL, 0x0000200020002000ULL, 0x0000200020200000ULL, 0x0000200020202000ULL,
		0x0000202000000000ULL, 0x0000202000002000ULL, 0x0000202000200000ULL, 0x0000202000202000ULL, 0x0000202020000000ULL, 0x0000202020002000ULL, 0x0000202020200000ULL, 0x0000202020202000ULL,
		0x0020000000000000ULL, 0x0020000000002000ULL, 0x0020000000200000ULL, 0x0020000000202000ULL, 0x0020000020000000ULL, 0x0020000020002000ULL, 0x0020000020200000ULL, 0x0020000020202000ULL,
		0x0020002000000000ULL, 0x0020002000002000ULL, 0x0020002000200000ULL, 0x0020002000202000ULL, 0x0020002020000000ULL, 0x0020002020002000ULL, 0x0020002020200000ULL, 0x0020002020202000ULL,
		0x0020200000000000ULL, 0x0020200000002000ULL, 0x0020200000200000ULL, 0x0020200000202000ULL, 0x0020200020000000ULL, 0x0020200020002000ULL, 0x0020200020200000ULL, 0x0020200020202000ULL,
		0x0020202000000000ULL, 0x0020202000002000ULL, 0x0020202000200000ULL, 0x0020202000202000ULL, 0x0020202020000000ULL, 0x0020202020002000ULL, 0x0020202020200000ULL, 0x0020202020202000ULL,
};

/** conversion from an 8-bit line to the G2-G7- line */
unsigned long long G2G7[64] = {
		0x0000000000000000ULL, 0x0000000000004000ULL, 0x0000000000400000ULL, 0x0000000000404000ULL, 0x0000000040000000ULL, 0x0000000040004000ULL, 0x0000000040400000ULL, 0x0000000040404000ULL,
		0x0000004000000000ULL, 0x0000004000004000ULL, 0x0000004000400000ULL, 0x0000004000404000ULL, 0x0000004040000000ULL, 0x0000004040004000ULL, 0x0000004040400000ULL, 0x0000004040404000ULL,
		0x0000400000000000ULL, 0x0000400000004000ULL, 0x0000400000400000ULL, 0x0000400000404000ULL, 0x0000400040000000ULL, 0x0000400040004000ULL, 0x0000400040400000ULL, 0x0000400040404000ULL,
		0x0000404000000000ULL, 0x0000404000004000ULL, 0x0000404000400000ULL, 0x0000404000404000ULL, 0x0000404040000000ULL, 0x0000404040004000ULL, 0x0000404040400000ULL, 0x0000404040404000ULL,
		0x0040000000000000ULL, 0x0040000000004000ULL, 0x0040000000400000ULL, 0x0040000000404000ULL, 0x0040000040000000ULL, 0x0040000040004000ULL, 0x0040000040400000ULL, 0x0040000040404000ULL,
		0x0040004000000000ULL, 0x0040004000004000ULL, 0x0040004000400000ULL, 0x0040004000404000ULL, 0x0040004040000000ULL, 0x0040004040004000ULL, 0x0040004040400000ULL, 0x0040004040404000ULL,
		0x0040400000000000ULL, 0x0040400000004000ULL, 0x0040400000400000ULL, 0x0040400000404000ULL, 0x0040400040000000ULL, 0x0040400040004000ULL, 0x0040400040400000ULL, 0x0040400040404000ULL,
		0x0040404000000000ULL, 0x0040404000004000ULL, 0x0040404000400000ULL, 0x0040404000404000ULL, 0x0040404040000000ULL, 0x0040404040004000ULL, 0x0040404040400000ULL, 0x0040404040404000ULL,
};

/** conversion from an 8-bit line to the H2-H7- line */
unsigned long long H2H7[64] = {
		0x0000000000000000ULL, 0x0000000000008000ULL, 0x0000000000800000ULL, 0x0000000000808000ULL, 0x0000000080000000ULL, 0x0000000080008000ULL, 0x0000000080800000ULL, 0x0000000080808000ULL,
		0x0000008000000000ULL, 0x0000008000008000ULL, 0x0000008000800000ULL, 0x0000008000808000ULL, 0x0000008080000000ULL, 0x0000008080008000ULL, 0x0000008080800000ULL, 0x0000008080808000ULL,
		0x0000800000000000ULL, 0x0000800000008000ULL, 0x0000800000800000ULL, 0x0000800000808000ULL, 0x0000800080000000ULL, 0x0000800080008000ULL, 0x0000800080800000ULL, 0x0000800080808000ULL,
		0x0000808000000000ULL, 0x0000808000008000ULL, 0x0000808000800000ULL, 0x0000808000808000ULL, 0x0000808080000000ULL, 0x0000808080008000ULL, 0x0000808080800000ULL, 0x0000808080808000ULL,
		0x0080000000000000ULL, 0x0080000000008000ULL, 0x0080000000800000ULL, 0x0080000000808000ULL, 0x0080000080000000ULL, 0x0080000080008000ULL, 0x0080000080800000ULL, 0x0080000080808000ULL,
		0x0080008000000000ULL, 0x0080008000008000ULL, 0x0080008000800000ULL, 0x0080008000808000ULL, 0x0080008080000000ULL, 0x0080008080008000ULL, 0x0080008080800000ULL, 0x0080008080808000ULL,
		0x0080800000000000ULL, 0x0080800000008000ULL, 0x0080800000800000ULL, 0x0080800000808000ULL, 0x0080800080000000ULL, 0x0080800080008000ULL, 0x0080800080800000ULL, 0x0080800080808000ULL,
		0x0080808000000000ULL, 0x0080808000008000ULL, 0x0080808000800000ULL, 0x0080808000808000ULL, 0x0080808080000000ULL, 0x0080808080008000ULL, 0x0080808080800000ULL, 0x0080808080808000ULL,
};

/** conversion from an 8-bit line to the E2-B5- line */
unsigned long long E2B5[16] = {
		0x0000000000000000ULL, 0x0000000200000000ULL, 0x0000000004000000ULL, 0x0000000204000000ULL, 0x0000000000080000ULL, 0x0000000200080000ULL, 0x0000000004080000ULL, 0x0000000204080000ULL,
		0x0000000000001000ULL, 0x0000000200001000ULL, 0x0000000004001000ULL, 0x0000000204001000ULL, 0x0000000000081000ULL, 0x0000000200081000ULL, 0x0000000004081000ULL, 0x0000000204081000ULL,
};

/** conversion from an 8-bit line to the F2-B6- line */
unsigned long long F2B6[32] = {
		0x0000000000000000ULL, 0x0000020000000000ULL, 0x0000000400000000ULL, 0x0000020400000000ULL, 0x0000000008000000ULL, 0x0000020008000000ULL, 0x0000000408000000ULL, 0x0000020408000000ULL,
		0x0000000000100000ULL, 0x0000020000100000ULL, 0x0000000400100000ULL, 0x0000020400100000ULL, 0x0000000008100000ULL, 0x0000020008100000ULL, 0x0000000408100000ULL, 0x0000020408100000ULL,
		0x0000000000002000ULL, 0x0000020000002000ULL, 0x0000000400002000ULL, 0x0000020400002000ULL, 0x0000000008002000ULL, 0x0000020008002000ULL, 0x0000000408002000ULL, 0x0000020408002000ULL,
		0x0000000000102000ULL, 0x0000020000102000ULL, 0x0000000400102000ULL, 0x0000020400102000ULL, 0x0000000008102000ULL, 0x0000020008102000ULL, 0x0000000408102000ULL, 0x0000020408102000ULL,
};

/** conversion from an 8-bit line to the G2-B7- line */
unsigned long long G2B7[64] = {
		0x0000000000000000ULL, 0x0002000000000000ULL, 0x0000040000000000ULL, 0x0002040000000000ULL, 0x0000000800000000ULL, 0x0002000800000000ULL, 0x0000040800000000ULL, 0x0002040800000000ULL,
		0x0000000010000000ULL, 0x0002000010000000ULL, 0x0000040010000000ULL, 0x0002040010000000ULL, 0x0000000810000000ULL, 0x0002000810000000ULL, 0x0000040810000000ULL, 0x0002040810000000ULL,
		0x0000000000200000ULL, 0x0002000000200000ULL, 0x0000040000200000ULL, 0x0002040000200000ULL, 0x0000000800200000ULL, 0x0002000800200000ULL, 0x0000040800200000ULL, 0x0002040800200000ULL,
		0x0000000010200000ULL, 0x0002000010200000ULL, 0x0000040010200000ULL, 0x0002040010200000ULL, 0x0000000810200000ULL, 0x0002000810200000ULL, 0x0000040810200000ULL, 0x0002040810200000ULL,
		0x0000000000004000ULL, 0x0002000000004000ULL, 0x0000040000004000ULL, 0x0002040000004000ULL, 0x0000000800004000ULL, 0x0002000800004000ULL, 0x0000040800004000ULL, 0x0002040800004000ULL,
		0x0000000010004000ULL, 0x0002000010004000ULL, 0x0000040010004000ULL, 0x0002040010004000ULL, 0x0000000810004000ULL, 0x0002000810004000ULL, 0x0000040810004000ULL, 0x0002040810004000ULL,
		0x0000000000204000ULL, 0x0002000000204000ULL, 0x0000040000204000ULL, 0x0002040000204000ULL, 0x0000000800204000ULL, 0x0002000800204000ULL, 0x0000040800204000ULL, 0x0002040800204000ULL,
		0x0000000010204000ULL, 0x0002000010204000ULL, 0x0000040010204000ULL, 0x0002040010204000ULL, 0x0000000810204000ULL, 0x0002000810204000ULL, 0x0000040810204000ULL, 0x0002040810204000ULL,
};

/** conversion from an 8-bit line to the G3-C7- line */
unsigned long long G3C7[32] = {
		0x0000000000000000ULL, 0x0004000000000000ULL, 0x0000080000000000ULL, 0x0004080000000000ULL, 0x0000001000000000ULL, 0x0004001000000000ULL, 0x0000081000000000ULL, 0x0004081000000000ULL,
		0x0000000020000000ULL, 0x0004000020000000ULL, 0x0000080020000000ULL, 0x0004080020000000ULL, 0x0000001020000000ULL, 0x0004001020000000ULL, 0x0000081020000000ULL, 0x0004081020000000ULL,
		0x0000000000400000ULL, 0x0004000000400000ULL, 0x0000080000400000ULL, 0x0004080000400000ULL, 0x0000001000400000ULL, 0x0004001000400000ULL, 0x0000081000400000ULL, 0x0004081000400000ULL,
		0x0000000020400000ULL, 0x0004000020400000ULL, 0x0000080020400000ULL, 0x0004080020400000ULL, 0x0000001020400000ULL, 0x0004001020400000ULL, 0x0000081020400000ULL, 0x0004081020400000ULL,
};

/** conversion from an 8-bit line to the G4-D7- line */
unsigned long long G4D7[16] = {
		0x0000000000000000ULL, 0x0008000000000000ULL, 0x0000100000000000ULL, 0x0008100000000000ULL, 0x0000002000000000ULL, 0x0008002000000000ULL, 0x0000102000000000ULL, 0x0008102000000000ULL,
		0x0000000040000000ULL, 0x0008000040000000ULL, 0x0000100040000000ULL, 0x0008100040000000ULL, 0x0000002040000000ULL, 0x0008002040000000ULL, 0x0000102040000000ULL, 0x0008102040000000ULL,
};

/** conversion from an 8-bit line to the B4-E7- line */
unsigned long long B4E7[16] = {
		0x0000000000000000ULL, 0x0000000002000000ULL, 0x0000000400000000ULL, 0x0000000402000000ULL, 0x0000080000000000ULL, 0x0000080002000000ULL, 0x0000080400000000ULL, 0x0000080402000000ULL,
		0x0010000000000000ULL, 0x0010000002000000ULL, 0x0010000400000000ULL, 0x0010000402000000ULL, 0x0010080000000000ULL, 0x0010080002000000ULL, 0x0010080400000000ULL, 0x0010080402000000ULL,
};

/** conversion from an 8-bit line to the B3-F7- line */
unsigned long long B3F7[32] = {
		0x0000000000000000ULL, 0x0000000000020000ULL, 0x0000000004000000ULL, 0x0000000004020000ULL, 0x0000000800000000ULL, 0x0000000800020000ULL, 0x0000000804000000ULL, 0x0000000804020000ULL,
		0x0000100000000000ULL, 0x0000100000020000ULL, 0x0000100004000000ULL, 0x0000100004020000ULL, 0x0000100800000000ULL, 0x0000100800020000ULL, 0x0000100804000000ULL, 0x0000100804020000ULL,
		0x0020000000000000ULL, 0x0020000000020000ULL, 0x0020000004000000ULL, 0x0020000004020000ULL, 0x0020000800000000ULL, 0x0020000800020000ULL, 0x0020000804000000ULL, 0x0020000804020000ULL,
		0x0020100000000000ULL, 0x0020100000020000ULL, 0x0020100004000000ULL, 0x0020100004020000ULL, 0x0020100800000000ULL, 0x0020100800020000ULL, 0x0020100804000000ULL, 0x0020100804020000ULL,
};

/** conversion from an 8-bit line to the B2-G7- line */
unsigned long long B2G7[64] = {
		0x0000000000000000ULL, 0x0000000000000200ULL, 0x0000000000040000ULL, 0x0000000000040200ULL, 0x0000000008000000ULL, 0x0000000008000200ULL, 0x0000000008040000ULL, 0x0000000008040200ULL,
		0x0000001000000000ULL, 0x0000001000000200ULL, 0x0000001000040000ULL, 0x0000001000040200ULL, 0x0000001008000000ULL, 0x0000001008000200ULL, 0x0000001008040000ULL, 0x0000001008040200ULL,
		0x0000200000000000ULL, 0x0000200000000200ULL, 0x0000200000040000ULL, 0x0000200000040200ULL, 0x0000200008000000ULL, 0x0000200008000200ULL, 0x0000200008040000ULL, 0x0000200008040200ULL,
		0x0000201000000000ULL, 0x0000201000000200ULL, 0x0000201000040000ULL, 0x0000201000040200ULL, 0x0000201008000000ULL, 0x0000201008000200ULL, 0x0000201008040000ULL, 0x0000201008040200ULL,
		0x0040000000000000ULL, 0x0040000000000200ULL, 0x0040000000040000ULL, 0x0040000000040200ULL, 0x0040000008000000ULL, 0x0040000008000200ULL, 0x0040000008040000ULL, 0x0040000008040200ULL,
		0x0040001000000000ULL, 0x0040001000000200ULL, 0x0040001000040000ULL, 0x0040001000040200ULL, 0x0040001008000000ULL, 0x0040001008000200ULL, 0x0040001008040000ULL, 0x0040001008040200ULL,
		0x0040200000000000ULL, 0x0040200000000200ULL, 0x0040200000040000ULL, 0x0040200000040200ULL, 0x0040200008000000ULL, 0x0040200008000200ULL, 0x0040200008040000ULL, 0x0040200008040200ULL,
		0x0040201000000000ULL, 0x0040201000000200ULL, 0x0040201000040000ULL, 0x0040201000040200ULL, 0x0040201008000000ULL, 0x0040201008000200ULL, 0x0040201008040000ULL, 0x0040201008040200ULL,
};

/** conversion from an 8-bit line to the C2-G6- line */
unsigned long long C2G6[32] = {
		0x0000000000000000ULL, 0x0000000000000400ULL, 0x0000000000080000ULL, 0x0000000000080400ULL, 0x0000000010000000ULL, 0x0000000010000400ULL, 0x0000000010080000ULL, 0x0000000010080400ULL,
		0x0000002000000000ULL, 0x0000002000000400ULL, 0x0000002000080000ULL, 0x0000002000080400ULL, 0x0000002010000000ULL, 0x0000002010000400ULL, 0x0000002010080000ULL, 0x0000002010080400ULL,
		0x0000400000000000ULL, 0x0000400000000400ULL, 0x0000400000080000ULL, 0x0000400000080400ULL, 0x0000400010000000ULL, 0x0000400010000400ULL, 0x0000400010080000ULL, 0x0000400010080400ULL,
		0x0000402000000000ULL, 0x0000402000000400ULL, 0x0000402000080000ULL, 0x0000402000080400ULL, 0x0000402010000000ULL, 0x0000402010000400ULL, 0x0000402010080000ULL, 0x0000402010080400ULL,
};

/** conversion from an 8-bit line to the D2-G5- line */
unsigned long long D2G5[16] = {
		0x0000000000000000ULL, 0x0000000000000800ULL, 0x0000000000100000ULL, 0x0000000000100800ULL, 0x0000000020000000ULL, 0x0000000020000800ULL, 0x0000000020100000ULL, 0x0000000020100800ULL,
		0x0000004000000000ULL, 0x0000004000000800ULL, 0x0000004000100000ULL, 0x0000004000100800ULL, 0x0000004020000000ULL, 0x0000004020000800ULL, 0x0000004020100000ULL, 0x0000004020100800ULL,
};


/** conversion from an 8-bit line to the B2-C1-G5 line */
unsigned long long B2C1G5[64] = {
		0x0000000000000000ULL, 0x0000000000000200ULL, 0x0000000000000004ULL, 0x0000000000000204ULL, 0x0000000000000800ULL, 0x0000000000000a00ULL, 0x0000000000000804ULL, 0x0000000000000a04ULL,
		0x0000000000100000ULL, 0x0000000000100200ULL, 0x0000000000100004ULL, 0x0000000000100204ULL, 0x0000000000100800ULL, 0x0000000000100a00ULL, 0x0000000000100804ULL, 0x0000000000100a04ULL,
		0x0000000020000000ULL, 0x0000000020000200ULL, 0x0000000020000004ULL, 0x0000000020000204ULL, 0x0000000020000800ULL, 0x0000000020000a00ULL, 0x0000000020000804ULL, 0x0000000020000a04ULL,
		0x0000000020100000ULL, 0x0000000020100200ULL, 0x0000000020100004ULL, 0x0000000020100204ULL, 0x0000000020100800ULL, 0x0000000020100a00ULL, 0x0000000020100804ULL, 0x0000000020100a04ULL,
		0x0000004000000000ULL, 0x0000004000000200ULL, 0x0000004000000004ULL, 0x0000004000000204ULL, 0x0000004000000800ULL, 0x0000004000000a00ULL, 0x0000004000000804ULL, 0x0000004000000a04ULL,
		0x0000004000100000ULL, 0x0000004000100200ULL, 0x0000004000100004ULL, 0x0000004000100204ULL, 0x0000004000100800ULL, 0x0000004000100a00ULL, 0x0000004000100804ULL, 0x0000004000100a04ULL,
		0x0000004020000000ULL, 0x0000004020000200ULL, 0x0000004020000004ULL, 0x0000004020000204ULL, 0x0000004020000800ULL, 0x0000004020000a00ULL, 0x0000004020000804ULL, 0x0000004020000a04ULL,
		0x0000004020100000ULL, 0x0000004020100200ULL, 0x0000004020100004ULL, 0x0000004020100204ULL, 0x0000004020100800ULL, 0x0000004020100a00ULL, 0x0000004020100804ULL, 0x0000004020100a04ULL,
};

/** conversion from an 8-bit line to the B3-D1-G4 line */
unsigned long long B3D1G4[64] = {
		0x0000000000000000ULL, 0x0000000000020000ULL, 0x0000000000000400ULL, 0x0000000000020400ULL, 0x0000000000000008ULL, 0x0000000000020008ULL, 0x0000000000000408ULL, 0x0000000000020408ULL,
		0x0000000000001000ULL, 0x0000000000021000ULL, 0x0000000000001400ULL, 0x0000000000021400ULL, 0x0000000000001008ULL, 0x0000000000021008ULL, 0x0000000000001408ULL, 0x0000000000021408ULL,
		0x0000000000200000ULL, 0x0000000000220000ULL, 0x0000000000200400ULL, 0x0000000000220400ULL, 0x0000000000200008ULL, 0x0000000000220008ULL, 0x0000000000200408ULL, 0x0000000000220408ULL,
		0x0000000000201000ULL, 0x0000000000221000ULL, 0x0000000000201400ULL, 0x0000000000221400ULL, 0x0000000000201008ULL, 0x0000000000221008ULL, 0x0000000000201408ULL, 0x0000000000221408ULL,
		0x0000000040000000ULL, 0x0000000040020000ULL, 0x0000000040000400ULL, 0x0000000040020400ULL, 0x0000000040000008ULL, 0x0000000040020008ULL, 0x0000000040000408ULL, 0x0000000040020408ULL,
		0x0000000040001000ULL, 0x0000000040021000ULL, 0x0000000040001400ULL, 0x0000000040021400ULL, 0x0000000040001008ULL, 0x0000000040021008ULL, 0x0000000040001408ULL, 0x0000000040021408ULL,
		0x0000000040200000ULL, 0x0000000040220000ULL, 0x0000000040200400ULL, 0x0000000040220400ULL, 0x0000000040200008ULL, 0x0000000040220008ULL, 0x0000000040200408ULL, 0x0000000040220408ULL,
		0x0000000040201000ULL, 0x0000000040221000ULL, 0x0000000040201400ULL, 0x0000000040221400ULL, 0x0000000040201008ULL, 0x0000000040221008ULL, 0x0000000040201408ULL, 0x0000000040221408ULL,
};

/** conversion from an 8-bit line to the B4-E1-G3 line */
unsigned long long B4E1G3[64] = {
		0x0000000000000000ULL, 0x0000000002000000ULL, 0x0000000000040000ULL, 0x0000000002040000ULL, 0x0000000000000800ULL, 0x0000000002000800ULL, 0x0000000000040800ULL, 0x0000000002040800ULL,
		0x0000000000000010ULL, 0x0000000002000010ULL, 0x0000000000040010ULL, 0x0000000002040010ULL, 0x0000000000000810ULL, 0x0000000002000810ULL, 0x0000000000040810ULL, 0x0000000002040810ULL,
		0x0000000000002000ULL, 0x0000000002002000ULL, 0x0000000000042000ULL, 0x0000000002042000ULL, 0x0000000000002800ULL, 0x0000000002002800ULL, 0x0000000000042800ULL, 0x0000000002042800ULL,
		0x0000000000002010ULL, 0x0000000002002010ULL, 0x0000000000042010ULL, 0x0000000002042010ULL, 0x0000000000002810ULL, 0x0000000002002810ULL, 0x0000000000042810ULL, 0x0000000002042810ULL,
		0x0000000000400000ULL, 0x0000000002400000ULL, 0x0000000000440000ULL, 0x0000000002440000ULL, 0x0000000000400800ULL, 0x0000000002400800ULL, 0x0000000000440800ULL, 0x0000000002440800ULL,
		0x0000000000400010ULL, 0x0000000002400010ULL, 0x0000000000440010ULL, 0x0000000002440010ULL, 0x0000000000400810ULL, 0x0000000002400810ULL, 0x0000000000440810ULL, 0x0000000002440810ULL,
		0x0000000000402000ULL, 0x0000000002402000ULL, 0x0000000000442000ULL, 0x0000000002442000ULL, 0x0000000000402800ULL, 0x0000000002402800ULL, 0x0000000000442800ULL, 0x0000000002442800ULL,
		0x0000000000402010ULL, 0x0000000002402010ULL, 0x0000000000442010ULL, 0x0000000002442010ULL, 0x0000000000402810ULL, 0x0000000002402810ULL, 0x0000000000442810ULL, 0x0000000002442810ULL,
};

/** conversion from an 8-bit line to the B5-F1-G2 line */
unsigned long long B5F1G2[64] = {
		0x0000000000000000ULL, 0x0000000200000000ULL, 0x0000000004000000ULL, 0x0000000204000000ULL, 0x0000000000080000ULL, 0x0000000200080000ULL, 0x0000000004080000ULL, 0x0000000204080000ULL,
		0x0000000000001000ULL, 0x0000000200001000ULL, 0x0000000004001000ULL, 0x0000000204001000ULL, 0x0000000000081000ULL, 0x0000000200081000ULL, 0x0000000004081000ULL, 0x0000000204081000ULL,
		0x0000000000000020ULL, 0x0000000200000020ULL, 0x0000000004000020ULL, 0x0000000204000020ULL, 0x0000000000080020ULL, 0x0000000200080020ULL, 0x0000000004080020ULL, 0x0000000204080020ULL,
		0x0000000000001020ULL, 0x0000000200001020ULL, 0x0000000004001020ULL, 0x0000000204001020ULL, 0x0000000000081020ULL, 0x0000000200081020ULL, 0x0000000004081020ULL, 0x0000000204081020ULL,
		0x0000000000004000ULL, 0x0000000200004000ULL, 0x0000000004004000ULL, 0x0000000204004000ULL, 0x0000000000084000ULL, 0x0000000200084000ULL, 0x0000000004084000ULL, 0x0000000204084000ULL,
		0x0000000000005000ULL, 0x0000000200005000ULL, 0x0000000004005000ULL, 0x0000000204005000ULL, 0x0000000000085000ULL, 0x0000000200085000ULL, 0x0000000004085000ULL, 0x0000000204085000ULL,
		0x0000000000004020ULL, 0x0000000200004020ULL, 0x0000000004004020ULL, 0x0000000204004020ULL, 0x0000000000084020ULL, 0x0000000200084020ULL, 0x0000000004084020ULL, 0x0000000204084020ULL,
		0x0000000000005020ULL, 0x0000000200005020ULL, 0x0000000004005020ULL, 0x0000000204005020ULL, 0x0000000000085020ULL, 0x0000000200085020ULL, 0x0000000004085020ULL, 0x0000000204085020ULL,
};

/** conversion from an 8-bit line to the B3-C2-G6 line */
unsigned long long B3C2G6[64] = {
		0x0000000000000000ULL, 0x0000000000020000ULL, 0x0000000000000400ULL, 0x0000000000020400ULL, 0x0000000000080000ULL, 0x00000000000a0000ULL, 0x0000000000080400ULL, 0x00000000000a0400ULL,
		0x0000000010000000ULL, 0x0000000010020000ULL, 0x0000000010000400ULL, 0x0000000010020400ULL, 0x0000000010080000ULL, 0x00000000100a0000ULL, 0x0000000010080400ULL, 0x00000000100a0400ULL,
		0x0000002000000000ULL, 0x0000002000020000ULL, 0x0000002000000400ULL, 0x0000002000020400ULL, 0x0000002000080000ULL, 0x00000020000a0000ULL, 0x0000002000080400ULL, 0x00000020000a0400ULL,
		0x0000002010000000ULL, 0x0000002010020000ULL, 0x0000002010000400ULL, 0x0000002010020400ULL, 0x0000002010080000ULL, 0x00000020100a0000ULL, 0x0000002010080400ULL, 0x00000020100a0400ULL,
		0x0000400000000000ULL, 0x0000400000020000ULL, 0x0000400000000400ULL, 0x0000400000020400ULL, 0x0000400000080000ULL, 0x00004000000a0000ULL, 0x0000400000080400ULL, 0x00004000000a0400ULL,
		0x0000400010000000ULL, 0x0000400010020000ULL, 0x0000400010000400ULL, 0x0000400010020400ULL, 0x0000400010080000ULL, 0x00004000100a0000ULL, 0x0000400010080400ULL, 0x00004000100a0400ULL,
		0x0000402000000000ULL, 0x0000402000020000ULL, 0x0000402000000400ULL, 0x0000402000020400ULL, 0x0000402000080000ULL, 0x00004020000a0000ULL, 0x0000402000080400ULL, 0x00004020000a0400ULL,
		0x0000402010000000ULL, 0x0000402010020000ULL, 0x0000402010000400ULL, 0x0000402010020400ULL, 0x0000402010080000ULL, 0x00004020100a0000ULL, 0x0000402010080400ULL, 0x00004020100a0400ULL,
};

/** conversion from an 8-bit line to the B4-D2-G5 line */
unsigned long long B4D2G5[64] = {
		0x0000000000000000ULL, 0x0000000002000000ULL, 0x0000000000040000ULL, 0x0000000002040000ULL, 0x0000000000000800ULL, 0x0000000002000800ULL, 0x0000000000040800ULL, 0x0000000002040800ULL,
		0x0000000000100000ULL, 0x0000000002100000ULL, 0x0000000000140000ULL, 0x0000000002140000ULL, 0x0000000000100800ULL, 0x0000000002100800ULL, 0x0000000000140800ULL, 0x0000000002140800ULL,
		0x0000000020000000ULL, 0x0000000022000000ULL, 0x0000000020040000ULL, 0x0000000022040000ULL, 0x0000000020000800ULL, 0x0000000022000800ULL, 0x0000000020040800ULL, 0x0000000022040800ULL,
		0x0000000020100000ULL, 0x0000000022100000ULL, 0x0000000020140000ULL, 0x0000000022140000ULL, 0x0000000020100800ULL, 0x0000000022100800ULL, 0x0000000020140800ULL, 0x0000000022140800ULL,
		0x0000004000000000ULL, 0x0000004002000000ULL, 0x0000004000040000ULL, 0x0000004002040000ULL, 0x0000004000000800ULL, 0x0000004002000800ULL, 0x0000004000040800ULL, 0x0000004002040800ULL,
		0x0000004000100000ULL, 0x0000004002100000ULL, 0x0000004000140000ULL, 0x0000004002140000ULL, 0x0000004000100800ULL, 0x0000004002100800ULL, 0x0000004000140800ULL, 0x0000004002140800ULL,
		0x0000004020000000ULL, 0x0000004022000000ULL, 0x0000004020040000ULL, 0x0000004022040000ULL, 0x0000004020000800ULL, 0x0000004022000800ULL, 0x0000004020040800ULL, 0x0000004022040800ULL,
		0x0000004020100000ULL, 0x0000004022100000ULL, 0x0000004020140000ULL, 0x0000004022140000ULL, 0x0000004020100800ULL, 0x0000004022100800ULL, 0x0000004020140800ULL, 0x0000004022140800ULL,
};

/** conversion from an 8-bit line to the B5-E2-G4 line */
unsigned long long B5E2G4[64] = {
		0x0000000000000000ULL, 0x0000000200000000ULL, 0x0000000004000000ULL, 0x0000000204000000ULL, 0x0000000000080000ULL, 0x0000000200080000ULL, 0x0000000004080000ULL, 0x0000000204080000ULL,
		0x0000000000001000ULL, 0x0000000200001000ULL, 0x0000000004001000ULL, 0x0000000204001000ULL, 0x0000000000081000ULL, 0x0000000200081000ULL, 0x0000000004081000ULL, 0x0000000204081000ULL,
		0x0000000000200000ULL, 0x0000000200200000ULL, 0x0000000004200000ULL, 0x0000000204200000ULL, 0x0000000000280000ULL, 0x0000000200280000ULL, 0x0000000004280000ULL, 0x0000000204280000ULL,
		0x0000000000201000ULL, 0x0000000200201000ULL, 0x0000000004201000ULL, 0x0000000204201000ULL, 0x0000000000281000ULL, 0x0000000200281000ULL, 0x0000000004281000ULL, 0x0000000204281000ULL,
		0x0000000040000000ULL, 0x0000000240000000ULL, 0x0000000044000000ULL, 0x0000000244000000ULL, 0x0000000040080000ULL, 0x0000000240080000ULL, 0x0000000044080000ULL, 0x0000000244080000ULL,
		0x0000000040001000ULL, 0x0000000240001000ULL, 0x0000000044001000ULL, 0x0000000244001000ULL, 0x0000000040081000ULL, 0x0000000240081000ULL, 0x0000000044081000ULL, 0x0000000244081000ULL,
		0x0000000040200000ULL, 0x0000000240200000ULL, 0x0000000044200000ULL, 0x0000000244200000ULL, 0x0000000040280000ULL, 0x0000000240280000ULL, 0x0000000044280000ULL, 0x0000000244280000ULL,
		0x0000000040201000ULL, 0x0000000240201000ULL, 0x0000000044201000ULL, 0x0000000244201000ULL, 0x0000000040281000ULL, 0x0000000240281000ULL, 0x0000000044281000ULL, 0x0000000244281000ULL,
};

/** conversion from an 8-bit line to the B6-F2-G3 line */
unsigned long long B6F2G3[64] = {
		0x0000000000000000ULL, 0x0000020000000000ULL, 0x0000000400000000ULL, 0x0000020400000000ULL, 0x0000000008000000ULL, 0x0000020008000000ULL, 0x0000000408000000ULL, 0x0000020408000000ULL,
		0x0000000000100000ULL, 0x0000020000100000ULL, 0x0000000400100000ULL, 0x0000020400100000ULL, 0x0000000008100000ULL, 0x0000020008100000ULL, 0x0000000408100000ULL, 0x0000020408100000ULL,
		0x0000000000002000ULL, 0x0000020000002000ULL, 0x0000000400002000ULL, 0x0000020400002000ULL, 0x0000000008002000ULL, 0x0000020008002000ULL, 0x0000000408002000ULL, 0x0000020408002000ULL,
		0x0000000000102000ULL, 0x0000020000102000ULL, 0x0000000400102000ULL, 0x0000020400102000ULL, 0x0000000008102000ULL, 0x0000020008102000ULL, 0x0000000408102000ULL, 0x0000020408102000ULL,
		0x0000000000400000ULL, 0x0000020000400000ULL, 0x0000000400400000ULL, 0x0000020400400000ULL, 0x0000000008400000ULL, 0x0000020008400000ULL, 0x0000000408400000ULL, 0x0000020408400000ULL,
		0x0000000000500000ULL, 0x0000020000500000ULL, 0x0000000400500000ULL, 0x0000020400500000ULL, 0x0000000008500000ULL, 0x0000020008500000ULL, 0x0000000408500000ULL, 0x0000020408500000ULL,
		0x0000000000402000ULL, 0x0000020000402000ULL, 0x0000000400402000ULL, 0x0000020400402000ULL, 0x0000000008402000ULL, 0x0000020008402000ULL, 0x0000000408402000ULL, 0x0000020408402000ULL,
		0x0000000000502000ULL, 0x0000020000502000ULL, 0x0000000400502000ULL, 0x0000020400502000ULL, 0x0000000008502000ULL, 0x0000020008502000ULL, 0x0000000408502000ULL, 0x0000020408502000ULL,
};

/** conversion from an 8-bit line to the B6-C7-G3 line */
unsigned long long B6C7G3[64] = {
		0x0000000000000000ULL, 0x0000020000000000ULL, 0x0004000000000000ULL, 0x0004020000000000ULL, 0x0000080000000000ULL, 0x00000a0000000000ULL, 0x0004080000000000ULL, 0x00040a0000000000ULL,
		0x0000001000000000ULL, 0x0000021000000000ULL, 0x0004001000000000ULL, 0x0004021000000000ULL, 0x0000081000000000ULL, 0x00000a1000000000ULL, 0x0004081000000000ULL, 0x00040a1000000000ULL,
		0x0000000020000000ULL, 0x0000020020000000ULL, 0x0004000020000000ULL, 0x0004020020000000ULL, 0x0000080020000000ULL, 0x00000a0020000000ULL, 0x0004080020000000ULL, 0x00040a0020000000ULL,
		0x0000001020000000ULL, 0x0000021020000000ULL, 0x0004001020000000ULL, 0x0004021020000000ULL, 0x0000081020000000ULL, 0x00000a1020000000ULL, 0x0004081020000000ULL, 0x00040a1020000000ULL,
		0x0000000000400000ULL, 0x0000020000400000ULL, 0x0004000000400000ULL, 0x0004020000400000ULL, 0x0000080000400000ULL, 0x00000a0000400000ULL, 0x0004080000400000ULL, 0x00040a0000400000ULL,
		0x0000001000400000ULL, 0x0000021000400000ULL, 0x0004001000400000ULL, 0x0004021000400000ULL, 0x0000081000400000ULL, 0x00000a1000400000ULL, 0x0004081000400000ULL, 0x00040a1000400000ULL,
		0x0000000020400000ULL, 0x0000020020400000ULL, 0x0004000020400000ULL, 0x0004020020400000ULL, 0x0000080020400000ULL, 0x00000a0020400000ULL, 0x0004080020400000ULL, 0x00040a0020400000ULL,
		0x0000001020400000ULL, 0x0000021020400000ULL, 0x0004001020400000ULL, 0x0004021020400000ULL, 0x0000081020400000ULL, 0x00000a1020400000ULL, 0x0004081020400000ULL, 0x00040a1020400000ULL,
};

/** conversion from an 8-bit line to the B5-D7-G4 line */
unsigned long long B5D7G4[64] = {
		0x0000000000000000ULL, 0x0000000200000000ULL, 0x0000040000000000ULL, 0x0000040200000000ULL, 0x0008000000000000ULL, 0x0008000200000000ULL, 0x0008040000000000ULL, 0x0008040200000000ULL,
		0x0000100000000000ULL, 0x0000100200000000ULL, 0x0000140000000000ULL, 0x0000140200000000ULL, 0x0008100000000000ULL, 0x0008100200000000ULL, 0x0008140000000000ULL, 0x0008140200000000ULL,
		0x0000002000000000ULL, 0x0000002200000000ULL, 0x0000042000000000ULL, 0x0000042200000000ULL, 0x0008002000000000ULL, 0x0008002200000000ULL, 0x0008042000000000ULL, 0x0008042200000000ULL,
		0x0000102000000000ULL, 0x0000102200000000ULL, 0x0000142000000000ULL, 0x0000142200000000ULL, 0x0008102000000000ULL, 0x0008102200000000ULL, 0x0008142000000000ULL, 0x0008142200000000ULL,
		0x0000000040000000ULL, 0x0000000240000000ULL, 0x0000040040000000ULL, 0x0000040240000000ULL, 0x0008000040000000ULL, 0x0008000240000000ULL, 0x0008040040000000ULL, 0x0008040240000000ULL,
		0x0000100040000000ULL, 0x0000100240000000ULL, 0x0000140040000000ULL, 0x0000140240000000ULL, 0x0008100040000000ULL, 0x0008100240000000ULL, 0x0008140040000000ULL, 0x0008140240000000ULL,
		0x0000002040000000ULL, 0x0000002240000000ULL, 0x0000042040000000ULL, 0x0000042240000000ULL, 0x0008002040000000ULL, 0x0008002240000000ULL, 0x0008042040000000ULL, 0x0008042240000000ULL,
		0x0000102040000000ULL, 0x0000102240000000ULL, 0x0000142040000000ULL, 0x0000142240000000ULL, 0x0008102040000000ULL, 0x0008102240000000ULL, 0x0008142040000000ULL, 0x0008142240000000ULL,
};

/** conversion from an 8-bit line to the B4-E7-G5 line */
unsigned long long B4E7G5[64] = {
		0x0000000000000000ULL, 0x0000000002000000ULL, 0x0000000400000000ULL, 0x0000000402000000ULL, 0x0000080000000000ULL, 0x0000080002000000ULL, 0x0000080400000000ULL, 0x0000080402000000ULL,
		0x0010000000000000ULL, 0x0010000002000000ULL, 0x0010000400000000ULL, 0x0010000402000000ULL, 0x0010080000000000ULL, 0x0010080002000000ULL, 0x0010080400000000ULL, 0x0010080402000000ULL,
		0x0000200000000000ULL, 0x0000200002000000ULL, 0x0000200400000000ULL, 0x0000200402000000ULL, 0x0000280000000000ULL, 0x0000280002000000ULL, 0x0000280400000000ULL, 0x0000280402000000ULL,
		0x0010200000000000ULL, 0x0010200002000000ULL, 0x0010200400000000ULL, 0x0010200402000000ULL, 0x0010280000000000ULL, 0x0010280002000000ULL, 0x0010280400000000ULL, 0x0010280402000000ULL,
		0x0000004000000000ULL, 0x0000004002000000ULL, 0x0000004400000000ULL, 0x0000004402000000ULL, 0x0000084000000000ULL, 0x0000084002000000ULL, 0x0000084400000000ULL, 0x0000084402000000ULL,
		0x0010004000000000ULL, 0x0010004002000000ULL, 0x0010004400000000ULL, 0x0010004402000000ULL, 0x0010084000000000ULL, 0x0010084002000000ULL, 0x0010084400000000ULL, 0x0010084402000000ULL,
		0x0000204000000000ULL, 0x0000204002000000ULL, 0x0000204400000000ULL, 0x0000204402000000ULL, 0x0000284000000000ULL, 0x0000284002000000ULL, 0x0000284400000000ULL, 0x0000284402000000ULL,
		0x0010204000000000ULL, 0x0010204002000000ULL, 0x0010204400000000ULL, 0x0010204402000000ULL, 0x0010284000000000ULL, 0x0010284002000000ULL, 0x0010284400000000ULL, 0x0010284402000000ULL,
};

/** conversion from an 8-bit line to the B3-F7-G6 line */
unsigned long long B3F7G6[64] = {
		0x0000000000000000ULL, 0x0000000000020000ULL, 0x0000000004000000ULL, 0x0000000004020000ULL, 0x0000000800000000ULL, 0x0000000800020000ULL, 0x0000000804000000ULL, 0x0000000804020000ULL,
		0x0000100000000000ULL, 0x0000100000020000ULL, 0x0000100004000000ULL, 0x0000100004020000ULL, 0x0000100800000000ULL, 0x0000100800020000ULL, 0x0000100804000000ULL, 0x0000100804020000ULL,
		0x0020000000000000ULL, 0x0020000000020000ULL, 0x0020000004000000ULL, 0x0020000004020000ULL, 0x0020000800000000ULL, 0x0020000800020000ULL, 0x0020000804000000ULL, 0x0020000804020000ULL,
		0x0020100000000000ULL, 0x0020100000020000ULL, 0x0020100004000000ULL, 0x0020100004020000ULL, 0x0020100800000000ULL, 0x0020100800020000ULL, 0x0020100804000000ULL, 0x0020100804020000ULL,
		0x0000400000000000ULL, 0x0000400000020000ULL, 0x0000400004000000ULL, 0x0000400004020000ULL, 0x0000400800000000ULL, 0x0000400800020000ULL, 0x0000400804000000ULL, 0x0000400804020000ULL,
		0x0000500000000000ULL, 0x0000500000020000ULL, 0x0000500004000000ULL, 0x0000500004020000ULL, 0x0000500800000000ULL, 0x0000500800020000ULL, 0x0000500804000000ULL, 0x0000500804020000ULL,
		0x0020400000000000ULL, 0x0020400000020000ULL, 0x0020400004000000ULL, 0x0020400004020000ULL, 0x0020400800000000ULL, 0x0020400800020000ULL, 0x0020400804000000ULL, 0x0020400804020000ULL,
		0x0020500000000000ULL, 0x0020500000020000ULL, 0x0020500004000000ULL, 0x0020500004020000ULL, 0x0020500800000000ULL, 0x0020500800020000ULL, 0x0020500804000000ULL, 0x0020500804020000ULL,
};

/** conversion from an 8-bit line to the B7-C8-G4 line */
unsigned long long B7C8G4[64] = {
		0x0000000000000000ULL, 0x0002000000000000ULL, 0x0400000000000000ULL, 0x0402000000000000ULL, 0x0008000000000000ULL, 0x000a000000000000ULL, 0x0408000000000000ULL, 0x040a000000000000ULL,
		0x0000100000000000ULL, 0x0002100000000000ULL, 0x0400100000000000ULL, 0x0402100000000000ULL, 0x0008100000000000ULL, 0x000a100000000000ULL, 0x0408100000000000ULL, 0x040a100000000000ULL,
		0x0000002000000000ULL, 0x0002002000000000ULL, 0x0400002000000000ULL, 0x0402002000000000ULL, 0x0008002000000000ULL, 0x000a002000000000ULL, 0x0408002000000000ULL, 0x040a002000000000ULL,
		0x0000102000000000ULL, 0x0002102000000000ULL, 0x0400102000000000ULL, 0x0402102000000000ULL, 0x0008102000000000ULL, 0x000a102000000000ULL, 0x0408102000000000ULL, 0x040a102000000000ULL,
		0x0000000040000000ULL, 0x0002000040000000ULL, 0x0400000040000000ULL, 0x0402000040000000ULL, 0x0008000040000000ULL, 0x000a000040000000ULL, 0x0408000040000000ULL, 0x040a000040000000ULL,
		0x0000100040000000ULL, 0x0002100040000000ULL, 0x0400100040000000ULL, 0x0402100040000000ULL, 0x0008100040000000ULL, 0x000a100040000000ULL, 0x0408100040000000ULL, 0x040a100040000000ULL,
		0x0000002040000000ULL, 0x0002002040000000ULL, 0x0400002040000000ULL, 0x0402002040000000ULL, 0x0008002040000000ULL, 0x000a002040000000ULL, 0x0408002040000000ULL, 0x040a002040000000ULL,
		0x0000102040000000ULL, 0x0002102040000000ULL, 0x0400102040000000ULL, 0x0402102040000000ULL, 0x0008102040000000ULL, 0x000a102040000000ULL, 0x0408102040000000ULL, 0x040a102040000000ULL,
};

/** conversion from an 8-bit line to the B6-D8-G5 line */
unsigned long long B6D8G5[64] = {
		0x0000000000000000ULL, 0x0000020000000000ULL, 0x0004000000000000ULL, 0x0004020000000000ULL, 0x0800000000000000ULL, 0x0800020000000000ULL, 0x0804000000000000ULL, 0x0804020000000000ULL,
		0x0010000000000000ULL, 0x0010020000000000ULL, 0x0014000000000000ULL, 0x0014020000000000ULL, 0x0810000000000000ULL, 0x0810020000000000ULL, 0x0814000000000000ULL, 0x0814020000000000ULL,
		0x0000200000000000ULL, 0x0000220000000000ULL, 0x0004200000000000ULL, 0x0004220000000000ULL, 0x0800200000000000ULL, 0x0800220000000000ULL, 0x0804200000000000ULL, 0x0804220000000000ULL,
		0x0010200000000000ULL, 0x0010220000000000ULL, 0x0014200000000000ULL, 0x0014220000000000ULL, 0x0810200000000000ULL, 0x0810220000000000ULL, 0x0814200000000000ULL, 0x0814220000000000ULL,
		0x0000004000000000ULL, 0x0000024000000000ULL, 0x0004004000000000ULL, 0x0004024000000000ULL, 0x0800004000000000ULL, 0x0800024000000000ULL, 0x0804004000000000ULL, 0x0804024000000000ULL,
		0x0010004000000000ULL, 0x0010024000000000ULL, 0x0014004000000000ULL, 0x0014024000000000ULL, 0x0810004000000000ULL, 0x0810024000000000ULL, 0x0814004000000000ULL, 0x0814024000000000ULL,
		0x0000204000000000ULL, 0x0000224000000000ULL, 0x0004204000000000ULL, 0x0004224000000000ULL, 0x0800204000000000ULL, 0x0800224000000000ULL, 0x0804204000000000ULL, 0x0804224000000000ULL,
		0x0010204000000000ULL, 0x0010224000000000ULL, 0x0014204000000000ULL, 0x0014224000000000ULL, 0x0810204000000000ULL, 0x0810224000000000ULL, 0x0814204000000000ULL, 0x0814224000000000ULL,
};

/** conversion from an 8-bit line to the B5-E8-G6 line */
unsigned long long B5E8G6[64] = {
		0x0000000000000000ULL, 0x0000000200000000ULL, 0x0000040000000000ULL, 0x0000040200000000ULL, 0x0008000000000000ULL, 0x0008000200000000ULL, 0x0008040000000000ULL, 0x0008040200000000ULL,
		0x1000000000000000ULL, 0x1000000200000000ULL, 0x1000040000000000ULL, 0x1000040200000000ULL, 0x1008000000000000ULL, 0x1008000200000000ULL, 0x1008040000000000ULL, 0x1008040200000000ULL,
		0x0020000000000000ULL, 0x0020000200000000ULL, 0x0020040000000000ULL, 0x0020040200000000ULL, 0x0028000000000000ULL, 0x0028000200000000ULL, 0x0028040000000000ULL, 0x0028040200000000ULL,
		0x1020000000000000ULL, 0x1020000200000000ULL, 0x1020040000000000ULL, 0x1020040200000000ULL, 0x1028000000000000ULL, 0x1028000200000000ULL, 0x1028040000000000ULL, 0x1028040200000000ULL,
		0x0000400000000000ULL, 0x0000400200000000ULL, 0x0000440000000000ULL, 0x0000440200000000ULL, 0x0008400000000000ULL, 0x0008400200000000ULL, 0x0008440000000000ULL, 0x0008440200000000ULL,
		0x1000400000000000ULL, 0x1000400200000000ULL, 0x1000440000000000ULL, 0x1000440200000000ULL, 0x1008400000000000ULL, 0x1008400200000000ULL, 0x1008440000000000ULL, 0x1008440200000000ULL,
		0x0020400000000000ULL, 0x0020400200000000ULL, 0x0020440000000000ULL, 0x0020440200000000ULL, 0x0028400000000000ULL, 0x0028400200000000ULL, 0x0028440000000000ULL, 0x0028440200000000ULL,
		0x1020400000000000ULL, 0x1020400200000000ULL, 0x1020440000000000ULL, 0x1020440200000000ULL, 0x1028400000000000ULL, 0x1028400200000000ULL, 0x1028440000000000ULL, 0x1028440200000000ULL,
};

/** conversion from an 8-bit line to the B4-F8-G7 line */
unsigned long long B4F8G7[64] = {
		0x0000000000000000ULL, 0x0000000002000000ULL, 0x0000000400000000ULL, 0x0000000402000000ULL, 0x0000080000000000ULL, 0x0000080002000000ULL, 0x0000080400000000ULL, 0x0000080402000000ULL,
		0x0010000000000000ULL, 0x0010000002000000ULL, 0x0010000400000000ULL, 0x0010000402000000ULL, 0x0010080000000000ULL, 0x0010080002000000ULL, 0x0010080400000000ULL, 0x0010080402000000ULL,
		0x2000000000000000ULL, 0x2000000002000000ULL, 0x2000000400000000ULL, 0x2000000402000000ULL, 0x2000080000000000ULL, 0x2000080002000000ULL, 0x2000080400000000ULL, 0x2000080402000000ULL,
		0x2010000000000000ULL, 0x2010000002000000ULL, 0x2010000400000000ULL, 0x2010000402000000ULL, 0x2010080000000000ULL, 0x2010080002000000ULL, 0x2010080400000000ULL, 0x2010080402000000ULL,
		0x0040000000000000ULL, 0x0040000002000000ULL, 0x0040000400000000ULL, 0x0040000402000000ULL, 0x0040080000000000ULL, 0x0040080002000000ULL, 0x0040080400000000ULL, 0x0040080402000000ULL,
		0x0050000000000000ULL, 0x0050000002000000ULL, 0x0050000400000000ULL, 0x0050000402000000ULL, 0x0050080000000000ULL, 0x0050080002000000ULL, 0x0050080400000000ULL, 0x0050080402000000ULL,
		0x2040000000000000ULL, 0x2040000002000000ULL, 0x2040000400000000ULL, 0x2040000402000000ULL, 0x2040080000000000ULL, 0x2040080002000000ULL, 0x2040080400000000ULL, 0x2040080402000000ULL,
		0x2050000000000000ULL, 0x2050000002000000ULL, 0x2050000400000000ULL, 0x2050000402000000ULL, 0x2050080000000000ULL, 0x2050080002000000ULL, 0x2050080400000000ULL, 0x2050080402000000ULL,
};

/** conversion from an 8-bit line to the G2-H3-D7 line */
unsigned long long G2H3D7[64] = {
		0x0000000000000000ULL, 0x0000000000004000ULL, 0x0000000000800000ULL, 0x0000000000804000ULL, 0x0000000040000000ULL, 0x0000000040004000ULL, 0x0000000040800000ULL, 0x0000000040804000ULL,
		0x0000002000000000ULL, 0x0000002000004000ULL, 0x0000002000800000ULL, 0x0000002000804000ULL, 0x0000002040000000ULL, 0x0000002040004000ULL, 0x0000002040800000ULL, 0x0000002040804000ULL,
		0x0000100000000000ULL, 0x0000100000004000ULL, 0x0000100000800000ULL, 0x0000100000804000ULL, 0x0000100040000000ULL, 0x0000100040004000ULL, 0x0000100040800000ULL, 0x0000100040804000ULL,
		0x0000102000000000ULL, 0x0000102000004000ULL, 0x0000102000800000ULL, 0x0000102000804000ULL, 0x0000102040000000ULL, 0x0000102040004000ULL, 0x0000102040800000ULL, 0x0000102040804000ULL,
		0x0008000000000000ULL, 0x0008000000004000ULL, 0x0008000000800000ULL, 0x0008000000804000ULL, 0x0008000040000000ULL, 0x0008000040004000ULL, 0x0008000040800000ULL, 0x0008000040804000ULL,
		0x0008002000000000ULL, 0x0008002000004000ULL, 0x0008002000800000ULL, 0x0008002000804000ULL, 0x0008002040000000ULL, 0x0008002040004000ULL, 0x0008002040800000ULL, 0x0008002040804000ULL,
		0x0008100000000000ULL, 0x0008100000004000ULL, 0x0008100000800000ULL, 0x0008100000804000ULL, 0x0008100040000000ULL, 0x0008100040004000ULL, 0x0008100040800000ULL, 0x0008100040804000ULL,
		0x0008102000000000ULL, 0x0008102000004000ULL, 0x0008102000800000ULL, 0x0008102000804000ULL, 0x0008102040000000ULL, 0x0008102040004000ULL, 0x0008102040800000ULL, 0x0008102040804000ULL,
};

/** conversion from an 8-bit line to the F2-H4-E7 line */
unsigned long long F2H4E7[64] = {
		0x0000000000000000ULL, 0x0000000000002000ULL, 0x0000000000400000ULL, 0x0000000000402000ULL, 0x0000000080000000ULL, 0x0000000080002000ULL, 0x0000000080400000ULL, 0x0000000080402000ULL,
		0x0000004000000000ULL, 0x0000004000002000ULL, 0x0000004000400000ULL, 0x0000004000402000ULL, 0x0000004080000000ULL, 0x0000004080002000ULL, 0x0000004080400000ULL, 0x0000004080402000ULL,
		0x0000200000000000ULL, 0x0000200000002000ULL, 0x0000200000400000ULL, 0x0000200000402000ULL, 0x0000200080000000ULL, 0x0000200080002000ULL, 0x0000200080400000ULL, 0x0000200080402000ULL,
		0x0000204000000000ULL, 0x0000204000002000ULL, 0x0000204000400000ULL, 0x0000204000402000ULL, 0x0000204080000000ULL, 0x0000204080002000ULL, 0x0000204080400000ULL, 0x0000204080402000ULL,
		0x0010000000000000ULL, 0x0010000000002000ULL, 0x0010000000400000ULL, 0x0010000000402000ULL, 0x0010000080000000ULL, 0x0010000080002000ULL, 0x0010000080400000ULL, 0x0010000080402000ULL,
		0x0010004000000000ULL, 0x0010004000002000ULL, 0x0010004000400000ULL, 0x0010004000402000ULL, 0x0010004080000000ULL, 0x0010004080002000ULL, 0x0010004080400000ULL, 0x0010004080402000ULL,
		0x0010200000000000ULL, 0x0010200000002000ULL, 0x0010200000400000ULL, 0x0010200000402000ULL, 0x0010200080000000ULL, 0x0010200080002000ULL, 0x0010200080400000ULL, 0x0010200080402000ULL,
		0x0010204000000000ULL, 0x0010204000002000ULL, 0x0010204000400000ULL, 0x0010204000402000ULL, 0x0010204080000000ULL, 0x0010204080002000ULL, 0x0010204080400000ULL, 0x0010204080402000ULL,
};

/** conversion from an 8-bit line to the E2-H5-F7 line */
unsigned long long E2H5F7[64] = {
		0x0000000000000000ULL, 0x0000000000001000ULL, 0x0000000000200000ULL, 0x0000000000201000ULL, 0x0000000040000000ULL, 0x0000000040001000ULL, 0x0000000040200000ULL, 0x0000000040201000ULL,
		0x0000008000000000ULL, 0x0000008000001000ULL, 0x0000008000200000ULL, 0x0000008000201000ULL, 0x0000008040000000ULL, 0x0000008040001000ULL, 0x0000008040200000ULL, 0x0000008040201000ULL,
		0x0000400000000000ULL, 0x0000400000001000ULL, 0x0000400000200000ULL, 0x0000400000201000ULL, 0x0000400040000000ULL, 0x0000400040001000ULL, 0x0000400040200000ULL, 0x0000400040201000ULL,
		0x0000408000000000ULL, 0x0000408000001000ULL, 0x0000408000200000ULL, 0x0000408000201000ULL, 0x0000408040000000ULL, 0x0000408040001000ULL, 0x0000408040200000ULL, 0x0000408040201000ULL,
		0x0020000000000000ULL, 0x0020000000001000ULL, 0x0020000000200000ULL, 0x0020000000201000ULL, 0x0020000040000000ULL, 0x0020000040001000ULL, 0x0020000040200000ULL, 0x0020000040201000ULL,
		0x0020008000000000ULL, 0x0020008000001000ULL, 0x0020008000200000ULL, 0x0020008000201000ULL, 0x0020008040000000ULL, 0x0020008040001000ULL, 0x0020008040200000ULL, 0x0020008040201000ULL,
		0x0020400000000000ULL, 0x0020400000001000ULL, 0x0020400000200000ULL, 0x0020400000201000ULL, 0x0020400040000000ULL, 0x0020400040001000ULL, 0x0020400040200000ULL, 0x0020400040201000ULL,
		0x0020408000000000ULL, 0x0020408000001000ULL, 0x0020408000200000ULL, 0x0020408000201000ULL, 0x0020408040000000ULL, 0x0020408040001000ULL, 0x0020408040200000ULL, 0x0020408040201000ULL,
};

/** conversion from an 8-bit line to the D2-H6-G7 line */
unsigned long long D2H6G7[64] = {
		0x0000000000000000ULL, 0x0000000000000800ULL, 0x0000000000100000ULL, 0x0000000000100800ULL, 0x0000000020000000ULL, 0x0000000020000800ULL, 0x0000000020100000ULL, 0x0000000020100800ULL,
		0x0000004000000000ULL, 0x0000004000000800ULL, 0x0000004000100000ULL, 0x0000004000100800ULL, 0x0000004020000000ULL, 0x0000004020000800ULL, 0x0000004020100000ULL, 0x0000004020100800ULL,
		0x0000800000000000ULL, 0x0000800000000800ULL, 0x0000800000100000ULL, 0x0000800000100800ULL, 0x0000800020000000ULL, 0x0000800020000800ULL, 0x0000800020100000ULL, 0x0000800020100800ULL,
		0x0000804000000000ULL, 0x0000804000000800ULL, 0x0000804000100000ULL, 0x0000804000100800ULL, 0x0000804020000000ULL, 0x0000804020000800ULL, 0x0000804020100000ULL, 0x0000804020100800ULL,
		0x0040000000000000ULL, 0x0040000000000800ULL, 0x0040000000100000ULL, 0x0040000000100800ULL, 0x0040000020000000ULL, 0x0040000020000800ULL, 0x0040000020100000ULL, 0x0040000020100800ULL,
		0x0040004000000000ULL, 0x0040004000000800ULL, 0x0040004000100000ULL, 0x0040004000100800ULL, 0x0040004020000000ULL, 0x0040004020000800ULL, 0x0040004020100000ULL, 0x0040004020100800ULL,
		0x0040800000000000ULL, 0x0040800000000800ULL, 0x0040800000100000ULL, 0x0040800000100800ULL, 0x0040800020000000ULL, 0x0040800020000800ULL, 0x0040800020100000ULL, 0x0040800020100800ULL,
		0x0040804000000000ULL, 0x0040804000000800ULL, 0x0040804000100000ULL, 0x0040804000100800ULL, 0x0040804020000000ULL, 0x0040804020000800ULL, 0x0040804020100000ULL, 0x0040804020100800ULL,
};

/** conversion from an 8-bit line to the F2-G3-C7 line */
unsigned long long F2G3C7[64] = {
		0x0000000000000000ULL, 0x0000000000002000ULL, 0x0000000000400000ULL, 0x0000000000402000ULL, 0x0000000020000000ULL, 0x0000000020002000ULL, 0x0000000020400000ULL, 0x0000000020402000ULL,
		0x0000001000000000ULL, 0x0000001000002000ULL, 0x0000001000400000ULL, 0x0000001000402000ULL, 0x0000001020000000ULL, 0x0000001020002000ULL, 0x0000001020400000ULL, 0x0000001020402000ULL,
		0x0000080000000000ULL, 0x0000080000002000ULL, 0x0000080000400000ULL, 0x0000080000402000ULL, 0x0000080020000000ULL, 0x0000080020002000ULL, 0x0000080020400000ULL, 0x0000080020402000ULL,
		0x0000081000000000ULL, 0x0000081000002000ULL, 0x0000081000400000ULL, 0x0000081000402000ULL, 0x0000081020000000ULL, 0x0000081020002000ULL, 0x0000081020400000ULL, 0x0000081020402000ULL,
		0x0004000000000000ULL, 0x0004000000002000ULL, 0x0004000000400000ULL, 0x0004000000402000ULL, 0x0004000020000000ULL, 0x0004000020002000ULL, 0x0004000020400000ULL, 0x0004000020402000ULL,
		0x0004001000000000ULL, 0x0004001000002000ULL, 0x0004001000400000ULL, 0x0004001000402000ULL, 0x0004001020000000ULL, 0x0004001020002000ULL, 0x0004001020400000ULL, 0x0004001020402000ULL,
		0x0004080000000000ULL, 0x0004080000002000ULL, 0x0004080000400000ULL, 0x0004080000402000ULL, 0x0004080020000000ULL, 0x0004080020002000ULL, 0x0004080020400000ULL, 0x0004080020402000ULL,
		0x0004081000000000ULL, 0x0004081000002000ULL, 0x0004081000400000ULL, 0x0004081000402000ULL, 0x0004081020000000ULL, 0x0004081020002000ULL, 0x0004081020400000ULL, 0x0004081020402000ULL,
};

/** conversion from an 8-bit line to the E2-G4-D7 line */
unsigned long long E2G4D7[64] = {
		0x0000000000000000ULL, 0x0000000000001000ULL, 0x0000000000200000ULL, 0x0000000000201000ULL, 0x0000000040000000ULL, 0x0000000040001000ULL, 0x0000000040200000ULL, 0x0000000040201000ULL,
		0x0000002000000000ULL, 0x0000002000001000ULL, 0x0000002000200000ULL, 0x0000002000201000ULL, 0x0000002040000000ULL, 0x0000002040001000ULL, 0x0000002040200000ULL, 0x0000002040201000ULL,
		0x0000100000000000ULL, 0x0000100000001000ULL, 0x0000100000200000ULL, 0x0000100000201000ULL, 0x0000100040000000ULL, 0x0000100040001000ULL, 0x0000100040200000ULL, 0x0000100040201000ULL,
		0x0000102000000000ULL, 0x0000102000001000ULL, 0x0000102000200000ULL, 0x0000102000201000ULL, 0x0000102040000000ULL, 0x0000102040001000ULL, 0x0000102040200000ULL, 0x0000102040201000ULL,
		0x0008000000000000ULL, 0x0008000000001000ULL, 0x0008000000200000ULL, 0x0008000000201000ULL, 0x0008000040000000ULL, 0x0008000040001000ULL, 0x0008000040200000ULL, 0x0008000040201000ULL,
		0x0008002000000000ULL, 0x0008002000001000ULL, 0x0008002000200000ULL, 0x0008002000201000ULL, 0x0008002040000000ULL, 0x0008002040001000ULL, 0x0008002040200000ULL, 0x0008002040201000ULL,
		0x0008100000000000ULL, 0x0008100000001000ULL, 0x0008100000200000ULL, 0x0008100000201000ULL, 0x0008100040000000ULL, 0x0008100040001000ULL, 0x0008100040200000ULL, 0x0008100040201000ULL,
		0x0008102000000000ULL, 0x0008102000001000ULL, 0x0008102000200000ULL, 0x0008102000201000ULL, 0x0008102040000000ULL, 0x0008102040001000ULL, 0x0008102040200000ULL, 0x0008102040201000ULL,
};

/** conversion from an 8-bit line to the D2-G5-E7 line */
unsigned long long D2G5E7[64] = {
		0x0000000000000000ULL, 0x0000000000000800ULL, 0x0000000000100000ULL, 0x0000000000100800ULL, 0x0000000020000000ULL, 0x0000000020000800ULL, 0x0000000020100000ULL, 0x0000000020100800ULL,
		0x0000004000000000ULL, 0x0000004000000800ULL, 0x0000004000100000ULL, 0x0000004000100800ULL, 0x0000004020000000ULL, 0x0000004020000800ULL, 0x0000004020100000ULL, 0x0000004020100800ULL,
		0x0000200000000000ULL, 0x0000200000000800ULL, 0x0000200000100000ULL, 0x0000200000100800ULL, 0x0000200020000000ULL, 0x0000200020000800ULL, 0x0000200020100000ULL, 0x0000200020100800ULL,
		0x0000204000000000ULL, 0x0000204000000800ULL, 0x0000204000100000ULL, 0x0000204000100800ULL, 0x0000204020000000ULL, 0x0000204020000800ULL, 0x0000204020100000ULL, 0x0000204020100800ULL,
		0x0010000000000000ULL, 0x0010000000000800ULL, 0x0010000000100000ULL, 0x0010000000100800ULL, 0x0010000020000000ULL, 0x0010000020000800ULL, 0x0010000020100000ULL, 0x0010000020100800ULL,
		0x0010004000000000ULL, 0x0010004000000800ULL, 0x0010004000100000ULL, 0x0010004000100800ULL, 0x0010004020000000ULL, 0x0010004020000800ULL, 0x0010004020100000ULL, 0x0010004020100800ULL,
		0x0010200000000000ULL, 0x0010200000000800ULL, 0x0010200000100000ULL, 0x0010200000100800ULL, 0x0010200020000000ULL, 0x0010200020000800ULL, 0x0010200020100000ULL, 0x0010200020100800ULL,
		0x0010204000000000ULL, 0x0010204000000800ULL, 0x0010204000100000ULL, 0x0010204000100800ULL, 0x0010204020000000ULL, 0x0010204020000800ULL, 0x0010204020100000ULL, 0x0010204020100800ULL,
};

/** conversion from an 8-bit line to the C2-G6-F7 line */
unsigned long long C2G6F7[64] = {
		0x0000000000000000ULL, 0x0000000000000400ULL, 0x0000000000080000ULL, 0x0000000000080400ULL, 0x0000000010000000ULL, 0x0000000010000400ULL, 0x0000000010080000ULL, 0x0000000010080400ULL,
		0x0000002000000000ULL, 0x0000002000000400ULL, 0x0000002000080000ULL, 0x0000002000080400ULL, 0x0000002010000000ULL, 0x0000002010000400ULL, 0x0000002010080000ULL, 0x0000002010080400ULL,
		0x0000400000000000ULL, 0x0000400000000400ULL, 0x0000400000080000ULL, 0x0000400000080400ULL, 0x0000400010000000ULL, 0x0000400010000400ULL, 0x0000400010080000ULL, 0x0000400010080400ULL,
		0x0000402000000000ULL, 0x0000402000000400ULL, 0x0000402000080000ULL, 0x0000402000080400ULL, 0x0000402010000000ULL, 0x0000402010000400ULL, 0x0000402010080000ULL, 0x0000402010080400ULL,
		0x0020000000000000ULL, 0x0020000000000400ULL, 0x0020000000080000ULL, 0x0020000000080400ULL, 0x0020000010000000ULL, 0x0020000010000400ULL, 0x0020000010080000ULL, 0x0020000010080400ULL,
		0x0020002000000000ULL, 0x0020002000000400ULL, 0x0020002000080000ULL, 0x0020002000080400ULL, 0x0020002010000000ULL, 0x0020002010000400ULL, 0x0020002010080000ULL, 0x0020002010080400ULL,
		0x0020400000000000ULL, 0x0020400000000400ULL, 0x0020400000080000ULL, 0x0020400000080400ULL, 0x0020400010000000ULL, 0x0020400010000400ULL, 0x0020400010080000ULL, 0x0020400010080400ULL,
		0x0020402000000000ULL, 0x0020402000000400ULL, 0x0020402000080000ULL, 0x0020402000080400ULL, 0x0020402010000000ULL, 0x0020402010000400ULL, 0x0020402010080000ULL, 0x0020402010080400ULL,
};

/** conversion from an 8-bit line to the B2-A3-E7 line */
unsigned long long B2A3E7[64] = {
		0x0000000000000000ULL, 0x0000000000000200ULL, 0x0000000000010000ULL, 0x0000000000010200ULL, 0x0000000002000000ULL, 0x0000000002000200ULL, 0x0000000002010000ULL, 0x0000000002010200ULL,
		0x0000000400000000ULL, 0x0000000400000200ULL, 0x0000000400010000ULL, 0x0000000400010200ULL, 0x0000000402000000ULL, 0x0000000402000200ULL, 0x0000000402010000ULL, 0x0000000402010200ULL,
		0x0000080000000000ULL, 0x0000080000000200ULL, 0x0000080000010000ULL, 0x0000080000010200ULL, 0x0000080002000000ULL, 0x0000080002000200ULL, 0x0000080002010000ULL, 0x0000080002010200ULL,
		0x0000080400000000ULL, 0x0000080400000200ULL, 0x0000080400010000ULL, 0x0000080400010200ULL, 0x0000080402000000ULL, 0x0000080402000200ULL, 0x0000080402010000ULL, 0x0000080402010200ULL,
		0x0010000000000000ULL, 0x0010000000000200ULL, 0x0010000000010000ULL, 0x0010000000010200ULL, 0x0010000002000000ULL, 0x0010000002000200ULL, 0x0010000002010000ULL, 0x0010000002010200ULL,
		0x0010000400000000ULL, 0x0010000400000200ULL, 0x0010000400010000ULL, 0x0010000400010200ULL, 0x0010000402000000ULL, 0x0010000402000200ULL, 0x0010000402010000ULL, 0x0010000402010200ULL,
		0x0010080000000000ULL, 0x0010080000000200ULL, 0x0010080000010000ULL, 0x0010080000010200ULL, 0x0010080002000000ULL, 0x0010080002000200ULL, 0x0010080002010000ULL, 0x0010080002010200ULL,
		0x0010080400000000ULL, 0x0010080400000200ULL, 0x0010080400010000ULL, 0x0010080400010200ULL, 0x0010080402000000ULL, 0x0010080402000200ULL, 0x0010080402010000ULL, 0x0010080402010200ULL,
};

/** conversion from an 8-bit line to the C2-A4-D7 line */
unsigned long long C2A4D7[64] = {
		0x0000000000000000ULL, 0x0000000000000400ULL, 0x0000000000020000ULL, 0x0000000000020400ULL, 0x0000000001000000ULL, 0x0000000001000400ULL, 0x0000000001020000ULL, 0x0000000001020400ULL,
		0x0000000200000000ULL, 0x0000000200000400ULL, 0x0000000200020000ULL, 0x0000000200020400ULL, 0x0000000201000000ULL, 0x0000000201000400ULL, 0x0000000201020000ULL, 0x0000000201020400ULL,
		0x0000040000000000ULL, 0x0000040000000400ULL, 0x0000040000020000ULL, 0x0000040000020400ULL, 0x0000040001000000ULL, 0x0000040001000400ULL, 0x0000040001020000ULL, 0x0000040001020400ULL,
		0x0000040200000000ULL, 0x0000040200000400ULL, 0x0000040200020000ULL, 0x0000040200020400ULL, 0x0000040201000000ULL, 0x0000040201000400ULL, 0x0000040201020000ULL, 0x0000040201020400ULL,
		0x0008000000000000ULL, 0x0008000000000400ULL, 0x0008000000020000ULL, 0x0008000000020400ULL, 0x0008000001000000ULL, 0x0008000001000400ULL, 0x0008000001020000ULL, 0x0008000001020400ULL,
		0x0008000200000000ULL, 0x0008000200000400ULL, 0x0008000200020000ULL, 0x0008000200020400ULL, 0x0008000201000000ULL, 0x0008000201000400ULL, 0x0008000201020000ULL, 0x0008000201020400ULL,
		0x0008040000000000ULL, 0x0008040000000400ULL, 0x0008040000020000ULL, 0x0008040000020400ULL, 0x0008040001000000ULL, 0x0008040001000400ULL, 0x0008040001020000ULL, 0x0008040001020400ULL,
		0x0008040200000000ULL, 0x0008040200000400ULL, 0x0008040200020000ULL, 0x0008040200020400ULL, 0x0008040201000000ULL, 0x0008040201000400ULL, 0x0008040201020000ULL, 0x0008040201020400ULL,
};

/** conversion from an 8-bit line to the D2-A5-C7 line */
unsigned long long D2A5C7[64] = {
		0x0000000000000000ULL, 0x0000000000000800ULL, 0x0000000000040000ULL, 0x0000000000040800ULL, 0x0000000002000000ULL, 0x0000000002000800ULL, 0x0000000002040000ULL, 0x0000000002040800ULL,
		0x0000000100000000ULL, 0x0000000100000800ULL, 0x0000000100040000ULL, 0x0000000100040800ULL, 0x0000000102000000ULL, 0x0000000102000800ULL, 0x0000000102040000ULL, 0x0000000102040800ULL,
		0x0000020000000000ULL, 0x0000020000000800ULL, 0x0000020000040000ULL, 0x0000020000040800ULL, 0x0000020002000000ULL, 0x0000020002000800ULL, 0x0000020002040000ULL, 0x0000020002040800ULL,
		0x0000020100000000ULL, 0x0000020100000800ULL, 0x0000020100040000ULL, 0x0000020100040800ULL, 0x0000020102000000ULL, 0x0000020102000800ULL, 0x0000020102040000ULL, 0x0000020102040800ULL,
		0x0004000000000000ULL, 0x0004000000000800ULL, 0x0004000000040000ULL, 0x0004000000040800ULL, 0x0004000002000000ULL, 0x0004000002000800ULL, 0x0004000002040000ULL, 0x0004000002040800ULL,
		0x0004000100000000ULL, 0x0004000100000800ULL, 0x0004000100040000ULL, 0x0004000100040800ULL, 0x0004000102000000ULL, 0x0004000102000800ULL, 0x0004000102040000ULL, 0x0004000102040800ULL,
		0x0004020000000000ULL, 0x0004020000000800ULL, 0x0004020000040000ULL, 0x0004020000040800ULL, 0x0004020002000000ULL, 0x0004020002000800ULL, 0x0004020002040000ULL, 0x0004020002040800ULL,
		0x0004020100000000ULL, 0x0004020100000800ULL, 0x0004020100040000ULL, 0x0004020100040800ULL, 0x0004020102000000ULL, 0x0004020102000800ULL, 0x0004020102040000ULL, 0x0004020102040800ULL,
};

/** conversion from an 8-bit line to the E2-A6-B7 line */
unsigned long long E2A6B7[64] = {
		0x0000000000000000ULL, 0x0000000000001000ULL, 0x0000000000080000ULL, 0x0000000000081000ULL, 0x0000000004000000ULL, 0x0000000004001000ULL, 0x0000000004080000ULL, 0x0000000004081000ULL,
		0x0000000200000000ULL, 0x0000000200001000ULL, 0x0000000200080000ULL, 0x0000000200081000ULL, 0x0000000204000000ULL, 0x0000000204001000ULL, 0x0000000204080000ULL, 0x0000000204081000ULL,
		0x0000010000000000ULL, 0x0000010000001000ULL, 0x0000010000080000ULL, 0x0000010000081000ULL, 0x0000010004000000ULL, 0x0000010004001000ULL, 0x0000010004080000ULL, 0x0000010004081000ULL,
		0x0000010200000000ULL, 0x0000010200001000ULL, 0x0000010200080000ULL, 0x0000010200081000ULL, 0x0000010204000000ULL, 0x0000010204001000ULL, 0x0000010204080000ULL, 0x0000010204081000ULL,
		0x0002000000000000ULL, 0x0002000000001000ULL, 0x0002000000080000ULL, 0x0002000000081000ULL, 0x0002000004000000ULL, 0x0002000004001000ULL, 0x0002000004080000ULL, 0x0002000004081000ULL,
		0x0002000200000000ULL, 0x0002000200001000ULL, 0x0002000200080000ULL, 0x0002000200081000ULL, 0x0002000204000000ULL, 0x0002000204001000ULL, 0x0002000204080000ULL, 0x0002000204081000ULL,
		0x0002010000000000ULL, 0x0002010000001000ULL, 0x0002010000080000ULL, 0x0002010000081000ULL, 0x0002010004000000ULL, 0x0002010004001000ULL, 0x0002010004080000ULL, 0x0002010004081000ULL,
		0x0002010200000000ULL, 0x0002010200001000ULL, 0x0002010200080000ULL, 0x0002010200081000ULL, 0x0002010204000000ULL, 0x0002010204001000ULL, 0x0002010204080000ULL, 0x0002010204081000ULL,
};

/** conversion from an 8-bit line to the C2-B3-F7 line */
unsigned long long C2B3F7[64] = {
		0x0000000000000000ULL, 0x0000000000000400ULL, 0x0000000000020000ULL, 0x0000000000020400ULL, 0x0000000004000000ULL, 0x0000000004000400ULL, 0x0000000004020000ULL, 0x0000000004020400ULL,
		0x0000000800000000ULL, 0x0000000800000400ULL, 0x0000000800020000ULL, 0x0000000800020400ULL, 0x0000000804000000ULL, 0x0000000804000400ULL, 0x0000000804020000ULL, 0x0000000804020400ULL,
		0x0000100000000000ULL, 0x0000100000000400ULL, 0x0000100000020000ULL, 0x0000100000020400ULL, 0x0000100004000000ULL, 0x0000100004000400ULL, 0x0000100004020000ULL, 0x0000100004020400ULL,
		0x0000100800000000ULL, 0x0000100800000400ULL, 0x0000100800020000ULL, 0x0000100800020400ULL, 0x0000100804000000ULL, 0x0000100804000400ULL, 0x0000100804020000ULL, 0x0000100804020400ULL,
		0x0020000000000000ULL, 0x0020000000000400ULL, 0x0020000000020000ULL, 0x0020000000020400ULL, 0x0020000004000000ULL, 0x0020000004000400ULL, 0x0020000004020000ULL, 0x0020000004020400ULL,
		0x0020000800000000ULL, 0x0020000800000400ULL, 0x0020000800020000ULL, 0x0020000800020400ULL, 0x0020000804000000ULL, 0x0020000804000400ULL, 0x0020000804020000ULL, 0x0020000804020400ULL,
		0x0020100000000000ULL, 0x0020100000000400ULL, 0x0020100000020000ULL, 0x0020100000020400ULL, 0x0020100004000000ULL, 0x0020100004000400ULL, 0x0020100004020000ULL, 0x0020100004020400ULL,
		0x0020100800000000ULL, 0x0020100800000400ULL, 0x0020100800020000ULL, 0x0020100800020400ULL, 0x0020100804000000ULL, 0x0020100804000400ULL, 0x0020100804020000ULL, 0x0020100804020400ULL,
};

/** conversion from an 8-bit line to the D2-B4-E7 line */
unsigned long long D2B4E7[64] = {
		0x0000000000000000ULL, 0x0000000000000800ULL, 0x0000000000040000ULL, 0x0000000000040800ULL, 0x0000000002000000ULL, 0x0000000002000800ULL, 0x0000000002040000ULL, 0x0000000002040800ULL,
		0x0000000400000000ULL, 0x0000000400000800ULL, 0x0000000400040000ULL, 0x0000000400040800ULL, 0x0000000402000000ULL, 0x0000000402000800ULL, 0x0000000402040000ULL, 0x0000000402040800ULL,
		0x0000080000000000ULL, 0x0000080000000800ULL, 0x0000080000040000ULL, 0x0000080000040800ULL, 0x0000080002000000ULL, 0x0000080002000800ULL, 0x0000080002040000ULL, 0x0000080002040800ULL,
		0x0000080400000000ULL, 0x0000080400000800ULL, 0x0000080400040000ULL, 0x0000080400040800ULL, 0x0000080402000000ULL, 0x0000080402000800ULL, 0x0000080402040000ULL, 0x0000080402040800ULL,
		0x0010000000000000ULL, 0x0010000000000800ULL, 0x0010000000040000ULL, 0x0010000000040800ULL, 0x0010000002000000ULL, 0x0010000002000800ULL, 0x0010000002040000ULL, 0x0010000002040800ULL,
		0x0010000400000000ULL, 0x0010000400000800ULL, 0x0010000400040000ULL, 0x0010000400040800ULL, 0x0010000402000000ULL, 0x0010000402000800ULL, 0x0010000402040000ULL, 0x0010000402040800ULL,
		0x0010080000000000ULL, 0x0010080000000800ULL, 0x0010080000040000ULL, 0x0010080000040800ULL, 0x0010080002000000ULL, 0x0010080002000800ULL, 0x0010080002040000ULL, 0x0010080002040800ULL,
		0x0010080400000000ULL, 0x0010080400000800ULL, 0x0010080400040000ULL, 0x0010080400040800ULL, 0x0010080402000000ULL, 0x0010080402000800ULL, 0x0010080402040000ULL, 0x0010080402040800ULL,
};

/** conversion from an 8-bit line to the E2-B5-D7 line */
unsigned long long E2B5D7[64] = {
		0x0000000000000000ULL, 0x0000000000001000ULL, 0x0000000000080000ULL, 0x0000000000081000ULL, 0x0000000004000000ULL, 0x0000000004001000ULL, 0x0000000004080000ULL, 0x0000000004081000ULL,
		0x0000000200000000ULL, 0x0000000200001000ULL, 0x0000000200080000ULL, 0x0000000200081000ULL, 0x0000000204000000ULL, 0x0000000204001000ULL, 0x0000000204080000ULL, 0x0000000204081000ULL,
		0x0000040000000000ULL, 0x0000040000001000ULL, 0x0000040000080000ULL, 0x0000040000081000ULL, 0x0000040004000000ULL, 0x0000040004001000ULL, 0x0000040004080000ULL, 0x0000040004081000ULL,
		0x0000040200000000ULL, 0x0000040200001000ULL, 0x0000040200080000ULL, 0x0000040200081000ULL, 0x0000040204000000ULL, 0x0000040204001000ULL, 0x0000040204080000ULL, 0x0000040204081000ULL,
		0x0008000000000000ULL, 0x0008000000001000ULL, 0x0008000000080000ULL, 0x0008000000081000ULL, 0x0008000004000000ULL, 0x0008000004001000ULL, 0x0008000004080000ULL, 0x0008000004081000ULL,
		0x0008000200000000ULL, 0x0008000200001000ULL, 0x0008000200080000ULL, 0x0008000200081000ULL, 0x0008000204000000ULL, 0x0008000204001000ULL, 0x0008000204080000ULL, 0x0008000204081000ULL,
		0x0008040000000000ULL, 0x0008040000001000ULL, 0x0008040000080000ULL, 0x0008040000081000ULL, 0x0008040004000000ULL, 0x0008040004001000ULL, 0x0008040004080000ULL, 0x0008040004081000ULL,
		0x0008040200000000ULL, 0x0008040200001000ULL, 0x0008040200080000ULL, 0x0008040200081000ULL, 0x0008040204000000ULL, 0x0008040204001000ULL, 0x0008040204080000ULL, 0x0008040204081000ULL,
};

/** conversion from an 8-bit line to the F2-B6-C7 line */
unsigned long long F2B6C7[64] = {
		0x0000000000000000ULL, 0x0000000000002000ULL, 0x0000000000100000ULL, 0x0000000000102000ULL, 0x0000000008000000ULL, 0x0000000008002000ULL, 0x0000000008100000ULL, 0x0000000008102000ULL,
		0x0000000400000000ULL, 0x0000000400002000ULL, 0x0000000400100000ULL, 0x0000000400102000ULL, 0x0000000408000000ULL, 0x0000000408002000ULL, 0x0000000408100000ULL, 0x0000000408102000ULL,
		0x0000020000000000ULL, 0x0000020000002000ULL, 0x0000020000100000ULL, 0x0000020000102000ULL, 0x0000020008000000ULL, 0x0000020008002000ULL, 0x0000020008100000ULL, 0x0000020008102000ULL,
		0x0000020400000000ULL, 0x0000020400002000ULL, 0x0000020400100000ULL, 0x0000020400102000ULL, 0x0000020408000000ULL, 0x0000020408002000ULL, 0x0000020408100000ULL, 0x0000020408102000ULL,
		0x0004000000000000ULL, 0x0004000000002000ULL, 0x0004000000100000ULL, 0x0004000000102000ULL, 0x0004000008000000ULL, 0x0004000008002000ULL, 0x0004000008100000ULL, 0x0004000008102000ULL,
		0x0004000400000000ULL, 0x0004000400002000ULL, 0x0004000400100000ULL, 0x0004000400102000ULL, 0x0004000408000000ULL, 0x0004000408002000ULL, 0x0004000408100000ULL, 0x0004000408102000ULL,
		0x0004020000000000ULL, 0x0004020000002000ULL, 0x0004020000100000ULL, 0x0004020000102000ULL, 0x0004020008000000ULL, 0x0004020008002000ULL, 0x0004020008100000ULL, 0x0004020008102000ULL,
		0x0004020400000000ULL, 0x0004020400002000ULL, 0x0004020400100000ULL, 0x0004020400102000ULL, 0x0004020408000000ULL, 0x0004020408002000ULL, 0x0004020408100000ULL, 0x0004020408102000ULL,
};


/**
 * Compute flipped discs when playing on square A1.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_A1(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[0][(O & 0x0001010101010100) * 0x0002040810204000 >> 57] & (P & 0x0101010101010101) * 0x0102040810204080 >> 56;
	index_v = FLIPPED[0][index_v];
	flipped = A2A7[index_v];

	index_h = OUTFLANK[0][(O >> 1) & 0x3f] & P;
	flipped |= ((unsigned long long) FLIPPED[0][index_h]) << 1;

	index_d9 = OUTFLANK[0][(O & 0x0040201008040200ULL)* 0x0101010101010101ULL >> 57] & (P & 0x8040201008040201ULL) * 0x0101010101010101ULL >> 56;
	index_d9 = FLIPPED[0][index_d9];
	flipped |= B2G7[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square B1.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_B1(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[0][(O & 0x0002020202020200) * 0x0001020408102000 >> 57] & (P & 0x0202020202020202) * 0x0081020408102040 >> 56;
	index_v = FLIPPED[0][index_v];
	flipped = B2B7[index_v];

	index_h = OUTFLANK[1][(O >> 1) & 0x3f] & P;
	flipped |= ((unsigned long long) FLIPPED[1][index_h]) << 1;

	index_d9 = OUTFLANK[1][(O & 0x0000402010080400ULL)* 0x0101010101010101ULL >> 57] & (P & 0x0080402010080402ULL) * 0x0101010101010101ULL >> 56;
	index_d9 = FLIPPED[1][index_d9];
	flipped |= C2G6[index_d9 >> 1];


	return flipped;
}

/**
 * Compute flipped discs when playing on square C1.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_C1(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d;
	register unsigned long long flipped;

	index_v = OUTFLANK[0][(O & 0x0004040404040400) * 0x0000810204081000 >> 57] & (P & 0x0404040404040404) * 0x0040810204081020 >> 56;
	index_v = FLIPPED[0][index_v];
	flipped = C2C7[index_v];

	index_h = OUTFLANK[2][(O >> 1) & 0x3f] & P;
	flipped |= ((unsigned long long) FLIPPED[2][index_h]) << 1;

	index_d = OUTFLANK[2][(O & 0x0000004020100a04ULL) * 0x0101010101010101ULL >> 57] & (P & 0x0000804020110a04ULL) * 0x0101010101010101ULL >> 56;
	index_d = FLIPPED[2][index_d];
	flipped |= B2C1G5[index_d];


	return flipped;
}

/**
 * Compute flipped discs when playing on square D1.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_D1(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d;
	register unsigned long long flipped;

	index_v = OUTFLANK[0][(O & 0x0008080808080800) * 0x0000408102040800 >> 57] & (P & 0x0808080808080808) * 0x0020408102040810 >> 56;
	index_v = FLIPPED[0][index_v];
	flipped = D2D7[index_v];

	index_h = OUTFLANK[3][(O >> 1) & 0x3f] & P;
	flipped |= ((unsigned long long) FLIPPED[3][index_h]) << 1;

	index_d = OUTFLANK[3][(O & 0x0000000040221408ULL) * 0x0101010101010101ULL >> 57] & (P & 0x0000008041221408ULL) * 0x0101010101010101ULL >> 56;
	index_d = FLIPPED[3][index_d];
	flipped |= B3D1G4[index_d];


	return flipped;
}

/**
 * Compute flipped discs when playing on square E1.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_E1(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d;
	register unsigned long long flipped;

	index_v = OUTFLANK[0][(O & 0x0010101010101000) * 0x0000204081020400 >> 57] & (P & 0x1010101010101010) * 0x0010204081020408 >> 56;
	index_v = FLIPPED[0][index_v];
	flipped = E2E7[index_v];

	index_h = OUTFLANK[4][(O >> 1) & 0x3f] & P;
	flipped |= ((unsigned long long) FLIPPED[4][index_h]) << 1;

	index_d = OUTFLANK[4][(O & 0x0000000002442810ULL) * 0x0101010101010101ULL >> 57] & (P & 0x0000000182442810ULL) * 0x0101010101010101ULL >> 56;
	index_d = FLIPPED[4][index_d];
	flipped |= B4E1G3[index_d];


	return flipped;
}

/**
 * Compute flipped discs when playing on square F1.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_F1(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d;
	register unsigned long long flipped;

	index_v = OUTFLANK[0][(O & 0x0020202020202000) * 0x0000102040810200 >> 57] & (P & 0x2020202020202020) * 0x0008102040810204 >> 56;
	index_v = FLIPPED[0][index_v];
	flipped = F2F7[index_v];

	index_h = OUTFLANK[5][(O >> 1) & 0x3f] & P;
	flipped |= ((unsigned long long) FLIPPED[5][index_h]) << 1;

	index_d = OUTFLANK[5][(O & 0x0000000204085020ULL) * 0x0101010101010101ULL >> 57] & (P & 0x0000010204885020ULL) * 0x0101010101010101ULL >> 56;
	index_d = FLIPPED[5][index_d];
	flipped |= B5F1G2[index_d];


	return flipped;
}

/**
 * Compute flipped discs when playing on square G1.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_G1(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7;
	register unsigned long long flipped;

	index_v = OUTFLANK[0][(O & 0x0040404040404000) * 0x0000081020408100 >> 57] & (P & 0x4040404040404040) * 0x0004081020408102 >> 56;
	index_v = FLIPPED[0][index_v];
	flipped = G2G7[index_v];

	index_h = OUTFLANK[6][(O >> 1) & 0x3f] & P;
	flipped |= ((unsigned long long) FLIPPED[6][index_h]) << 1;

	index_d7 = OUTFLANK[6][(O & 0x0000020408102040ULL)* 0x0101010101010101ULL >> 57] & (P & 0x0001020408102040ULL) * 0x0101010101010101ULL >> 56;
	index_d7 = FLIPPED[6][index_d7];
	flipped |= F2B6[index_d7];


	return flipped;
}

/**
 * Compute flipped discs when playing on square H1.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_H1(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7;
	register unsigned long long flipped;

	index_v = OUTFLANK[0][(O & 0x0080808080808000) * 0x0000040810204080 >> 57] & (P & 0x8080808080808080) * 0x0002040810204081 >> 56;
	index_v = FLIPPED[0][index_v];
	flipped = H2H7[index_v];

	index_h = OUTFLANK[7][(O >> 1) & 0x3f] & P;
	flipped |= ((unsigned long long) FLIPPED[7][index_h]) << 1;

	index_d7 = OUTFLANK[7][(O & 0x0002040810204080ULL)* 0x0101010101010101ULL >> 57] & (P & 0x0102040810204080ULL) * 0x0101010101010101ULL >> 56;
	index_d7 = FLIPPED[7][index_d7];
	flipped |= G2B7[index_d7];


	return flipped;
}

/**
 * Compute flipped discs when playing on square A2.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_A2(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[1][(O & 0x0001010101010100) * 0x0002040810204000 >> 57] & (P & 0x0101010101010101) * 0x0102040810204080 >> 56;
	index_v = FLIPPED[1][index_v];
	flipped = A2A7[index_v];

	index_h = OUTFLANK[0][(O >> 9) & 0x3f] & (P >> 8);
	flipped |= ((unsigned long long) FLIPPED[0][index_h]) << 9;

	index_d9 = OUTFLANK[0][(O & 0x0020100804020000ULL)* 0x0101010101010101ULL >> 57] & (P & 0x4020100804020100ULL) * 0x0101010101010101ULL >> 56;
	index_d9 = FLIPPED[0][index_d9];
	flipped |= B3F7[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square B2.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_B2(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[1][(O & 0x0002020202020200) * 0x0001020408102000 >> 57] & (P & 0x0202020202020202) * 0x0081020408102040 >> 56;
	index_v = FLIPPED[1][index_v];
	flipped = B2B7[index_v];

	index_h = OUTFLANK[1][(O >> 9) & 0x3f] & (P >> 8);
	flipped |= ((unsigned long long) FLIPPED[1][index_h]) << 9;

	index_d9 = OUTFLANK[1][(O & 0x0040201008040200ULL)* 0x0101010101010101ULL >> 57] & (P & 0x8040201008040201ULL) * 0x0101010101010101ULL >> 56;
	index_d9 = FLIPPED[1][index_d9];
	flipped |= B2G7[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square C2.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_C2(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d;
	register unsigned long long flipped;

	index_v = OUTFLANK[1][(O & 0x0004040404040400) * 0x0000810204081000 >> 57] & (P & 0x0404040404040404) * 0x0040810204081020 >> 56;
	index_v = FLIPPED[1][index_v];
	flipped = C2C7[index_v];

	index_h = OUTFLANK[2][(O >> 9) & 0x3f] & (P >> 8);
	flipped |= ((unsigned long long) FLIPPED[2][index_h]) << 9;

	index_d = OUTFLANK[2][(O & 0x00004020100a0400ULL) * 0x0101010101010101ULL >> 57] & (P & 0x00804020110a0400ULL) * 0x0101010101010101ULL >> 56;
	index_d = FLIPPED[2][index_d];
	flipped |= B3C2G6[index_d];


	return flipped;
}

/**
 * Compute flipped discs when playing on square D2.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_D2(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d;
	register unsigned long long flipped;

	index_v = OUTFLANK[1][(O & 0x0008080808080800) * 0x0000408102040800 >> 57] & (P & 0x0808080808080808) * 0x0020408102040810 >> 56;
	index_v = FLIPPED[1][index_v];
	flipped = D2D7[index_v];

	index_h = OUTFLANK[3][(O >> 9) & 0x3f] & (P >> 8);
	flipped |= ((unsigned long long) FLIPPED[3][index_h]) << 9;

	index_d = OUTFLANK[3][(O & 0x0000004022140800ULL) * 0x0101010101010101ULL >> 57] & (P & 0x0000804122140800ULL) * 0x0101010101010101ULL >> 56;
	index_d = FLIPPED[3][index_d];
	flipped |= B4D2G5[index_d];


	return flipped;
}

/**
 * Compute flipped discs when playing on square E2.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_E2(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d;
	register unsigned long long flipped;

	index_v = OUTFLANK[1][(O & 0x0010101010101000) * 0x0000204081020400 >> 57] & (P & 0x1010101010101010) * 0x0010204081020408 >> 56;
	index_v = FLIPPED[1][index_v];
	flipped = E2E7[index_v];

	index_h = OUTFLANK[4][(O >> 9) & 0x3f] & (P >> 8);
	flipped |= ((unsigned long long) FLIPPED[4][index_h]) << 9;

	index_d = OUTFLANK[4][(O & 0x0000000244281000ULL) * 0x0101010101010101ULL >> 57] & (P & 0x0000018244281000ULL) * 0x0101010101010101ULL >> 56;
	index_d = FLIPPED[4][index_d];
	flipped |= B5E2G4[index_d];


	return flipped;
}

/**
 * Compute flipped discs when playing on square F2.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_F2(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d;
	register unsigned long long flipped;

	index_v = OUTFLANK[1][(O & 0x0020202020202000) * 0x0000102040810200 >> 57] & (P & 0x2020202020202020) * 0x0008102040810204 >> 56;
	index_v = FLIPPED[1][index_v];
	flipped = F2F7[index_v];

	index_h = OUTFLANK[5][(O >> 9) & 0x3f] & (P >> 8);
	flipped |= ((unsigned long long) FLIPPED[5][index_h]) << 9;

	index_d = OUTFLANK[5][(O & 0x0000020408502000ULL) * 0x0101010101010101ULL >> 57] & (P & 0x0001020488502000ULL) * 0x0101010101010101ULL >> 56;
	index_d = FLIPPED[5][index_d];
	flipped |= B6F2G3[index_d];


	return flipped;
}

/**
 * Compute flipped discs when playing on square G2.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_G2(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7;
	register unsigned long long flipped;

	index_v = OUTFLANK[1][(O & 0x0040404040404000) * 0x0000081020408100 >> 57] & (P & 0x4040404040404040) * 0x0004081020408102 >> 56;
	index_v = FLIPPED[1][index_v];
	flipped = G2G7[index_v];

	index_h = OUTFLANK[6][(O >> 9) & 0x3f] & (P >> 8);
	flipped |= ((unsigned long long) FLIPPED[6][index_h]) << 9;

	index_d7 = OUTFLANK[6][(O & 0x0002040810204000ULL)* 0x0101010101010101ULL >> 57] & (P & 0x0102040810204080ULL) * 0x0101010101010101ULL >> 56;
	index_d7 = FLIPPED[6][index_d7];
	flipped |= G2B7[index_d7];


	return flipped;
}

/**
 * Compute flipped discs when playing on square H2.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_H2(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7;
	register unsigned long long flipped;

	index_v = OUTFLANK[1][(O & 0x0080808080808000) * 0x0000040810204080 >> 57] & (P & 0x8080808080808080) * 0x0002040810204081 >> 56;
	index_v = FLIPPED[1][index_v];
	flipped = H2H7[index_v];

	index_h = OUTFLANK[7][(O >> 9) & 0x3f] & (P >> 8);
	flipped |= ((unsigned long long) FLIPPED[7][index_h]) << 9;

	index_d7 = OUTFLANK[7][(O & 0x0004081020408000ULL)* 0x0101010101010101ULL >> 57] & (P & 0x0204081020408000ULL) * 0x0101010101010101ULL >> 56;
	index_d7 = FLIPPED[7][index_d7];
	flipped |= G3C7[index_d7 >> 1];


	return flipped;
}

/**
 * Compute flipped discs when playing on square A3.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_A3(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d;
	register unsigned long long flipped;

	index_v = OUTFLANK[2][(O & 0x0001010101010100) * 0x0002040810204000 >> 57] & (P & 0x0101010101010101) * 0x0102040810204080 >> 56;
	index_v = FLIPPED[2][index_v];
	flipped = A2A7[index_v];

	index_h = OUTFLANK[0][(O >> 17) & 0x3f] & (P >> 16);
	flipped |= ((unsigned long long) FLIPPED[0][index_h]) << 17;

	index_d = OUTFLANK[2][(((O & 0x0010080402000200ULL) + 0x0070787c7e007e00ULL) & 0x8080808080808080ULL) * 0x0002040810204081ULL >> 57] & (((P & 0x2010080402010204ULL) + 0x6070787c7e7f7e7cULL) & 0x8080808080808080ULL) * 0x0002040810204081ULL >> 56;
	index_d = FLIPPED[2][index_d];
	flipped |= B2A3E7[index_d];


	return flipped;
}

/**
 * Compute flipped discs when playing on square B3.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_B3(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d;
	register unsigned long long flipped;

	index_v = OUTFLANK[2][(O & 0x0002020202020200) * 0x0001020408102000 >> 57] & (P & 0x0202020202020202) * 0x0081020408102040 >> 56;
	index_v = FLIPPED[2][index_v];
	flipped = B2B7[index_v];

	index_h = OUTFLANK[1][(O >> 17) & 0x3f] & (P >> 16);
	flipped |= ((unsigned long long) FLIPPED[1][index_h]) << 17;

	index_d = OUTFLANK[2][(((O & 0x0020100804020400ULL) + 0x006070787c7e7c00ULL) & 0x8080808080808080ULL) * 0x0002040810204081ULL >> 57] & (((P & 0x4020100804020408ULL) + 0x406070787c7e7c78ULL) & 0x8080808080808080ULL) * 0x0002040810204081ULL >> 56;
	index_d = FLIPPED[2][index_d];
	flipped |= C2B3F7[index_d];


	return flipped;
}

/**
 * Compute flipped discs when playing on square C3.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_C3(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[2][(O & 0x0004040404040400) * 0x0000810204081000 >> 57] & (P & 0x0404040404040404) * 0x0040810204081020 >> 56;
	index_v = FLIPPED[2][index_v];
	flipped = C2C7[index_v];

	index_h = OUTFLANK[2][(O >> 17) & 0x3f] & (P >> 16);
	flipped |= ((unsigned long long) FLIPPED[2][index_h]) << 17;

	flipped |= ((P >> 7) & 0x0000000002000000ULL & O) | ((P << 7) & 0x0000000000000800ULL & O);

	index_d9 = OUTFLANK[2][(O & 0x0040201008040200ULL)* 0x0101010101010101ULL >> 57] & (P & 0x8040201008040201ULL) * 0x0101010101010101ULL >> 56;
	index_d9 = FLIPPED[2][index_d9];
	flipped |= B2G7[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square D3.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_D3(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[2][(O & 0x0008080808080800) * 0x0000408102040800 >> 57] & (P & 0x0808080808080808) * 0x0020408102040810 >> 56;
	index_v = FLIPPED[2][index_v];
	flipped = D2D7[index_v];

	index_h = OUTFLANK[3][(O >> 17) & 0x3f] & (P >> 16);
	flipped |= ((unsigned long long) FLIPPED[3][index_h]) << 17;

	index_d7 = OUTFLANK[3][(O & 0x0000000204081000ULL)* 0x0101010101010101ULL >> 57] & (P & 0x0000010204081020ULL) * 0x0101010101010101ULL >> 56;
	index_d7 = FLIPPED[3][index_d7];
	flipped |= E2B5[index_d7];

	index_d9 = OUTFLANK[3][(O & 0x0000402010080400ULL)* 0x0101010101010101ULL >> 57] & (P & 0x0080402010080402ULL) * 0x0101010101010101ULL >> 56;
	index_d9 = FLIPPED[3][index_d9];
	flipped |= C2G6[index_d9 >> 1];


	return flipped;
}

/**
 * Compute flipped discs when playing on square E3.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_E3(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[2][(O & 0x0010101010101000) * 0x0000204081020400 >> 57] & (P & 0x1010101010101010) * 0x0010204081020408 >> 56;
	index_v = FLIPPED[2][index_v];
	flipped = E2E7[index_v];

	index_h = OUTFLANK[4][(O >> 17) & 0x3f] & (P >> 16);
	flipped |= ((unsigned long long) FLIPPED[4][index_h]) << 17;

	index_d7 = OUTFLANK[4][(O & 0x0000020408102000ULL)* 0x0101010101010101ULL >> 57] & (P & 0x0001020408102040ULL) * 0x0101010101010101ULL >> 56;
	index_d7 = FLIPPED[4][index_d7];
	flipped |= F2B6[index_d7];

	index_d9 = OUTFLANK[4][(O & 0x0000004020100800ULL)* 0x0101010101010101ULL >> 57] & (P & 0x0000804020100804ULL) * 0x0101010101010101ULL >> 56;
	index_d9 = FLIPPED[4][index_d9];
	flipped |= D2G5[index_d9 >> 2];


	return flipped;
}

/**
 * Compute flipped discs when playing on square F3.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_F3(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7;
	register unsigned long long flipped;

	index_v = OUTFLANK[2][(O & 0x0020202020202000) * 0x0000102040810200 >> 57] & (P & 0x2020202020202020) * 0x0008102040810204 >> 56;
	index_v = FLIPPED[2][index_v];
	flipped = F2F7[index_v];

	index_h = OUTFLANK[5][(O >> 17) & 0x3f] & (P >> 16);
	flipped |= ((unsigned long long) FLIPPED[5][index_h]) << 17;

	index_d7 = OUTFLANK[5][(O & 0x0002040810204000ULL)* 0x0101010101010101ULL >> 57] & (P & 0x0102040810204080ULL) * 0x0101010101010101ULL >> 56;
	index_d7 = FLIPPED[5][index_d7];
	flipped |= G2B7[index_d7];

	flipped |= ((P >> 9) & 0x0000000040000000ULL & O) | ((P << 9) & 0x0000000000001000ULL & O);


	return flipped;
}

/**
 * Compute flipped discs when playing on square G3.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_G3(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d;
	register unsigned long long flipped;

	index_v = OUTFLANK[2][(O & 0x0040404040404000) * 0x0000081020408100 >> 57] & (P & 0x4040404040404040) * 0x0004081020408102 >> 56;
	index_v = FLIPPED[2][index_v];
	flipped = G2G7[index_v];

	index_h = OUTFLANK[6][(O >> 17) & 0x3f] & (P >> 16);
	flipped |= ((unsigned long long) FLIPPED[6][index_h]) << 17;

	index_d = OUTFLANK[2][(((O & 0x0004081020402000ULL) + 0x007c787060406000ULL) & 0x8080808080808080ULL) * 0x0002040810204081ULL >> 57] & (((P & 0x0204081020402010ULL) + 0x7e7c787060406070ULL) & 0x8080808080808080ULL) * 0x0002040810204081ULL >> 56;
	index_d = FLIPPED[2][index_d];
	flipped |= F2G3C7[index_d];


	return flipped;
}

/**
 * Compute flipped discs when playing on square H3.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_H3(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d;
	register unsigned long long flipped;

	index_v = OUTFLANK[2][(O & 0x0080808080808000) * 0x0000040810204080 >> 57] & (P & 0x8080808080808080) * 0x0002040810204081 >> 56;
	index_v = FLIPPED[2][index_v];
	flipped = H2H7[index_v];

	index_h = OUTFLANK[7][(O >> 17) & 0x3f] & (P >> 16);
	flipped |= ((unsigned long long) FLIPPED[7][index_h]) << 17;

	index_d = OUTFLANK[2][(((O & 0x0008102040804000ULL) + 0x0078706040004000ULL) & 0x8080808080808080ULL) * 0x0002040810204081ULL >> 57] & (((P & 0x0408102040804020ULL) + 0x7c78706040004060ULL) & 0x8080808080808080ULL) * 0x0002040810204081ULL >> 56;
	index_d = FLIPPED[2][index_d];
	flipped |= G2H3D7[index_d];


	return flipped;
}

/**
 * Compute flipped discs when playing on square A4.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_A4(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d;
	register unsigned long long flipped;

	index_v = OUTFLANK[3][(O & 0x0001010101010100) * 0x0002040810204000 >> 57] & (P & 0x0101010101010101) * 0x0102040810204080 >> 56;
	index_v = FLIPPED[3][index_v];
	flipped = A2A7[index_v];

	index_h = OUTFLANK[0][(O >> 25) & 0x3f] & (P >> 24);
	flipped |= ((unsigned long long) FLIPPED[0][index_h]) << 25;

	index_d = OUTFLANK[3][(((O & 0x0008040200020400ULL) + 0x00787c7e007e7c00ULL) & 0x8080808080808080ULL) * 0x0002040810204081ULL >> 57] & (((P & 0x1008040201020408ULL) + 0x70787c7e7f7e7c78ULL) & 0x8080808080808080ULL) * 0x0002040810204081ULL >> 56;
	index_d = FLIPPED[3][index_d];
	flipped |= C2A4D7[index_d];


	return flipped;
}

/**
 * Compute flipped discs when playing on square B4.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_B4(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d;
	register unsigned long long flipped;

	index_v = OUTFLANK[3][(O & 0x0002020202020200) * 0x0001020408102000 >> 57] & (P & 0x0202020202020202) * 0x0081020408102040 >> 56;
	index_v = FLIPPED[3][index_v];
	flipped = B2B7[index_v];

	index_h = OUTFLANK[1][(O >> 25) & 0x3f] & (P >> 24);
	flipped |= ((unsigned long long) FLIPPED[1][index_h]) << 25;

	index_d = OUTFLANK[3][(((O & 0x0010080402040800ULL) + 0x0070787c7e7c7800ULL) & 0x8080808080808080ULL) * 0x0002040810204081ULL >> 57] & (((P & 0x2010080402040810ULL) + 0x6070787c7e7c7870ULL) & 0x8080808080808080ULL) * 0x0002040810204081ULL >> 56;
	index_d = FLIPPED[3][index_d];
	flipped |= D2B4E7[index_d];


	return flipped;
}

/**
 * Compute flipped discs when playing on square C4.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_C4(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[3][(O & 0x0004040404040400) * 0x0000810204081000 >> 57] & (P & 0x0404040404040404) * 0x0040810204081020 >> 56;
	index_v = FLIPPED[3][index_v];
	flipped = C2C7[index_v];

	index_h = OUTFLANK[2][(O >> 25) & 0x3f] & (P >> 24);
	flipped |= ((unsigned long long) FLIPPED[2][index_h]) << 25;

	index_d7 = OUTFLANK[2][(O & 0x0000000204081000ULL)* 0x0101010101010101ULL >> 57] & (P & 0x0000010204081020ULL) * 0x0101010101010101ULL >> 56;
	index_d7 = FLIPPED[2][index_d7];
	flipped |= E2B5[index_d7];

	index_d9 = OUTFLANK[2][(O & 0x0020100804020000ULL)* 0x0101010101010101ULL >> 57] & (P & 0x4020100804020100ULL) * 0x0101010101010101ULL >> 56;
	index_d9 = FLIPPED[2][index_d9];
	flipped |= B3F7[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square D4.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_D4(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[3][(O & 0x0008080808080800) * 0x0000408102040800 >> 57] & (P & 0x0808080808080808) * 0x0020408102040810 >> 56;
	index_v = FLIPPED[3][index_v];
	flipped = D2D7[index_v];

	index_h = OUTFLANK[3][(O >> 25) & 0x3f] & (P >> 24);
	flipped |= ((unsigned long long) FLIPPED[3][index_h]) << 25;

	index_d7 = OUTFLANK[3][(O & 0x0000020408102000ULL)* 0x0101010101010101ULL >> 57] & (P & 0x0001020408102040ULL) * 0x0101010101010101ULL >> 56;
	index_d7 = FLIPPED[3][index_d7];
	flipped |= F2B6[index_d7];

	index_d9 = OUTFLANK[3][(O & 0x0040201008040200ULL)* 0x0101010101010101ULL >> 57] & (P & 0x8040201008040201ULL) * 0x0101010101010101ULL >> 56;
	index_d9 = FLIPPED[3][index_d9];
	flipped |= B2G7[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square E4.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_E4(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[3][(O & 0x0010101010101000) * 0x0000204081020400 >> 57] & (P & 0x1010101010101010) * 0x0010204081020408 >> 56;
	index_v = FLIPPED[3][index_v];
	flipped = E2E7[index_v];

	index_h = OUTFLANK[4][(O >> 25) & 0x3f] & (P >> 24);
	flipped |= ((unsigned long long) FLIPPED[4][index_h]) << 25;

	index_d7 = OUTFLANK[4][(O & 0x0002040810204000ULL)* 0x0101010101010101ULL >> 57] & (P & 0x0102040810204080ULL) * 0x0101010101010101ULL >> 56;
	index_d7 = FLIPPED[4][index_d7];
	flipped |= G2B7[index_d7];

	index_d9 = OUTFLANK[4][(O & 0x0000402010080400ULL)* 0x0101010101010101ULL >> 57] & (P & 0x0080402010080402ULL) * 0x0101010101010101ULL >> 56;
	index_d9 = FLIPPED[4][index_d9];
	flipped |= C2G6[index_d9 >> 1];


	return flipped;
}

/**
 * Compute flipped discs when playing on square F4.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_F4(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[3][(O & 0x0020202020202000) * 0x0000102040810200 >> 57] & (P & 0x2020202020202020) * 0x0008102040810204 >> 56;
	index_v = FLIPPED[3][index_v];
	flipped = F2F7[index_v];

	index_h = OUTFLANK[5][(O >> 25) & 0x3f] & (P >> 24);
	flipped |= ((unsigned long long) FLIPPED[5][index_h]) << 25;

	index_d7 = OUTFLANK[5][(O & 0x0004081020400000ULL)* 0x0101010101010101ULL >> 57] & (P & 0x0204081020408000ULL) * 0x0101010101010101ULL >> 56;
	index_d7 = FLIPPED[5][index_d7];
	flipped |= G3C7[index_d7 >> 1];

	index_d9 = OUTFLANK[5][(O & 0x0000004020100800ULL)* 0x0101010101010101ULL >> 57] & (P & 0x0000804020100804ULL) * 0x0101010101010101ULL >> 56;
	index_d9 = FLIPPED[5][index_d9];
	flipped |= D2G5[index_d9 >> 2];


	return flipped;
}

/**
 * Compute flipped discs when playing on square G4.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_G4(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d;
	register unsigned long long flipped;

	index_v = OUTFLANK[3][(O & 0x0040404040404000) * 0x0000081020408100 >> 57] & (P & 0x4040404040404040) * 0x0004081020408102 >> 56;
	index_v = FLIPPED[3][index_v];
	flipped = G2G7[index_v];

	index_h = OUTFLANK[6][(O >> 25) & 0x3f] & (P >> 24);
	flipped |= ((unsigned long long) FLIPPED[6][index_h]) << 25;

	index_d = OUTFLANK[3][(((O & 0x0008102040201000ULL) + 0x0078706040607000ULL) & 0x8080808080808080ULL) * 0x0002040810204081ULL >> 57] & (((P & 0x0408102040201008ULL) + 0x7c78706040607078ULL) & 0x8080808080808080ULL) * 0x0002040810204081ULL >> 56;
	index_d = FLIPPED[3][index_d];
	flipped |= E2G4D7[index_d];


	return flipped;
}

/**
 * Compute flipped discs when playing on square H4.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_H4(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d;
	register unsigned long long flipped;

	index_v = OUTFLANK[3][(O & 0x0080808080808000) * 0x0000040810204080 >> 57] & (P & 0x8080808080808080) * 0x0002040810204081 >> 56;
	index_v = FLIPPED[3][index_v];
	flipped = H2H7[index_v];

	index_h = OUTFLANK[7][(O >> 25) & 0x3f] & (P >> 24);
	flipped |= ((unsigned long long) FLIPPED[7][index_h]) << 25;

	index_d = OUTFLANK[3][(((O & 0x0010204080402000ULL) + 0x0070604000406000ULL) & 0x8080808080808080ULL) * 0x0002040810204081ULL >> 57] & (((P & 0x0810204080402010ULL) + 0x7870604000406070ULL) & 0x8080808080808080ULL) * 0x0002040810204081ULL >> 56;
	index_d = FLIPPED[3][index_d];
	flipped |= F2H4E7[index_d];


	return flipped;
}

/**
 * Compute flipped discs when playing on square A5.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_A5(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d;
	register unsigned long long flipped;

	index_v = OUTFLANK[4][(O & 0x0001010101010100) * 0x0002040810204000 >> 57] & (P & 0x0101010101010101) * 0x0102040810204080 >> 56;
	index_v = FLIPPED[4][index_v];
	flipped = A2A7[index_v];

	index_h = OUTFLANK[0][(O >> 33) & 0x3f] & (P >> 32);
	flipped |= ((unsigned long long) FLIPPED[0][index_h]) << 33;

	index_d = OUTFLANK[4][(((O & 0x0004020002040800ULL) + 0x007c7e007e7c7800ULL) & 0x8080808080808080ULL) * 0x0002040810204081ULL >> 57] & (((P & 0x0804020102040810ULL) + 0x787c7e7f7e7c7870ULL) & 0x8080808080808080ULL) * 0x0002040810204081ULL >> 56;
	index_d = FLIPPED[4][index_d];
	flipped |= D2A5C7[index_d];


	return flipped;
}

/**
 * Compute flipped discs when playing on square B5.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_B5(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d;
	register unsigned long long flipped;

	index_v = OUTFLANK[4][(O & 0x0002020202020200) * 0x0001020408102000 >> 57] & (P & 0x0202020202020202) * 0x0081020408102040 >> 56;
	index_v = FLIPPED[4][index_v];
	flipped = B2B7[index_v];

	index_h = OUTFLANK[1][(O >> 33) & 0x3f] & (P >> 32);
	flipped |= ((unsigned long long) FLIPPED[1][index_h]) << 33;

	index_d = OUTFLANK[4][(((O & 0x0008040204081000ULL) + 0x00787c7e7c787000ULL) & 0x8080808080808080ULL) * 0x0002040810204081ULL >> 57] & (((P & 0x1008040204081020ULL) + 0x70787c7e7c787060ULL) & 0x8080808080808080ULL) * 0x0002040810204081ULL >> 56;
	index_d = FLIPPED[4][index_d];
	flipped |= E2B5D7[index_d];


	return flipped;
}

/**
 * Compute flipped discs when playing on square C5.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_C5(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[4][(O & 0x0004040404040400) * 0x0000810204081000 >> 57] & (P & 0x0404040404040404) * 0x0040810204081020 >> 56;
	index_v = FLIPPED[4][index_v];
	flipped = C2C7[index_v];

	index_h = OUTFLANK[2][(O >> 33) & 0x3f] & (P >> 32);
	flipped |= ((unsigned long long) FLIPPED[2][index_h]) << 33;

	index_d7 = OUTFLANK[2][(O & 0x0000020408102000ULL)* 0x0101010101010101ULL >> 57] & (P & 0x0001020408102040ULL) * 0x0101010101010101ULL >> 56;
	index_d7 = FLIPPED[2][index_d7];
	flipped |= F2B6[index_d7];

	index_d9 = OUTFLANK[2][(O & 0x0010080402000000ULL)* 0x0101010101010101ULL >> 57] & (P & 0x2010080402010000ULL) * 0x0101010101010101ULL >> 56;
	index_d9 = FLIPPED[2][index_d9];
	flipped |= B4E7[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square D5.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_D5(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[4][(O & 0x0008080808080800) * 0x0000408102040800 >> 57] & (P & 0x0808080808080808) * 0x0020408102040810 >> 56;
	index_v = FLIPPED[4][index_v];
	flipped = D2D7[index_v];

	index_h = OUTFLANK[3][(O >> 33) & 0x3f] & (P >> 32);
	flipped |= ((unsigned long long) FLIPPED[3][index_h]) << 33;

	index_d7 = OUTFLANK[3][(O & 0x0002040810204000ULL)* 0x0101010101010101ULL >> 57] & (P & 0x0102040810204080ULL) * 0x0101010101010101ULL >> 56;
	index_d7 = FLIPPED[3][index_d7];
	flipped |= G2B7[index_d7];

	index_d9 = OUTFLANK[3][(O & 0x0020100804020000ULL)* 0x0101010101010101ULL >> 57] & (P & 0x4020100804020100ULL) * 0x0101010101010101ULL >> 56;
	index_d9 = FLIPPED[3][index_d9];
	flipped |= B3F7[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square E5.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_E5(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[4][(O & 0x0010101010101000) * 0x0000204081020400 >> 57] & (P & 0x1010101010101010) * 0x0010204081020408 >> 56;
	index_v = FLIPPED[4][index_v];
	flipped = E2E7[index_v];

	index_h = OUTFLANK[4][(O >> 33) & 0x3f] & (P >> 32);
	flipped |= ((unsigned long long) FLIPPED[4][index_h]) << 33;

	index_d7 = OUTFLANK[4][(O & 0x0004081020400000ULL)* 0x0101010101010101ULL >> 57] & (P & 0x0204081020408000ULL) * 0x0101010101010101ULL >> 56;
	index_d7 = FLIPPED[4][index_d7];
	flipped |= G3C7[index_d7 >> 1];

	index_d9 = OUTFLANK[4][(O & 0x0040201008040200ULL)* 0x0101010101010101ULL >> 57] & (P & 0x8040201008040201ULL) * 0x0101010101010101ULL >> 56;
	index_d9 = FLIPPED[4][index_d9];
	flipped |= B2G7[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square F5.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_F5(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[4][(O & 0x0020202020202000) * 0x0000102040810200 >> 57] & (P & 0x2020202020202020) * 0x0008102040810204 >> 56;
	index_v = FLIPPED[4][index_v];
	flipped = F2F7[index_v];

	index_h = OUTFLANK[5][(O >> 33) & 0x3f] & (P >> 32);
	flipped |= ((unsigned long long) FLIPPED[5][index_h]) << 33;

	index_d7 = OUTFLANK[5][(O & 0x0008102040000000ULL)* 0x0101010101010101ULL >> 57] & (P & 0x0408102040800000ULL) * 0x0101010101010101ULL >> 56;
	index_d7 = FLIPPED[5][index_d7];
	flipped |= G4D7[index_d7 >> 2];

	index_d9 = OUTFLANK[5][(O & 0x0000402010080400ULL)* 0x0101010101010101ULL >> 57] & (P & 0x0080402010080402ULL) * 0x0101010101010101ULL >> 56;
	index_d9 = FLIPPED[5][index_d9];
	flipped |= C2G6[index_d9 >> 1];


	return flipped;
}

/**
 * Compute flipped discs when playing on square G5.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_G5(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d;
	register unsigned long long flipped;

	index_v = OUTFLANK[4][(O & 0x0040404040404000) * 0x0000081020408100 >> 57] & (P & 0x4040404040404040) * 0x0004081020408102 >> 56;
	index_v = FLIPPED[4][index_v];
	flipped = G2G7[index_v];

	index_h = OUTFLANK[6][(O >> 33) & 0x3f] & (P >> 32);
	flipped |= ((unsigned long long) FLIPPED[6][index_h]) << 33;

	index_d = OUTFLANK[4][(((O & 0x0010204020100800ULL) + 0x0070604060707800ULL) & 0x8080808080808080ULL) * 0x0002040810204081ULL >> 57] & (((P & 0x0810204020100804ULL) + 0x787060406070787cULL) & 0x8080808080808080ULL) * 0x0002040810204081ULL >> 56;
	index_d = FLIPPED[4][index_d];
	flipped |= D2G5E7[index_d];


	return flipped;
}

/**
 * Compute flipped discs when playing on square H5.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_H5(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d;
	register unsigned long long flipped;

	index_v = OUTFLANK[4][(O & 0x0080808080808000) * 0x0000040810204080 >> 57] & (P & 0x8080808080808080) * 0x0002040810204081 >> 56;
	index_v = FLIPPED[4][index_v];
	flipped = H2H7[index_v];

	index_h = OUTFLANK[7][(O >> 33) & 0x3f] & (P >> 32);
	flipped |= ((unsigned long long) FLIPPED[7][index_h]) << 33;

	index_d = OUTFLANK[4][(((O & 0x0020408040201000ULL) + 0x0060400040607000ULL) & 0x8080808080808080ULL) * 0x0002040810204081ULL >> 57] & (((P & 0x1020408040201008ULL) + 0x7060400040607078ULL) & 0x8080808080808080ULL) * 0x0002040810204081ULL >> 56;
	index_d = FLIPPED[4][index_d];
	flipped |= E2H5F7[index_d];


	return flipped;
}

/**
 * Compute flipped discs when playing on square A6.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_A6(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d;
	register unsigned long long flipped;

	index_v = OUTFLANK[5][(O & 0x0001010101010100) * 0x0002040810204000 >> 57] & (P & 0x0101010101010101) * 0x0102040810204080 >> 56;
	index_v = FLIPPED[5][index_v];
	flipped = A2A7[index_v];

	index_h = OUTFLANK[0][(O >> 41) & 0x3f] & (P >> 40);
	flipped |= ((unsigned long long) FLIPPED[0][index_h]) << 41;

	index_d = OUTFLANK[5][(((O & 0x0002000204081000ULL) + 0x007e007e7c787000ULL) & 0x8080808080808080ULL) * 0x0002040810204081ULL >> 57] & (((P & 0x0402010204081020ULL) + 0x7c7e7f7e7c787060ULL) & 0x8080808080808080ULL) * 0x0002040810204081ULL >> 56;
	index_d = FLIPPED[5][index_d];
	flipped |= E2A6B7[index_d];


	return flipped;
}

/**
 * Compute flipped discs when playing on square B6.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_B6(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d;
	register unsigned long long flipped;

	index_v = OUTFLANK[5][(O & 0x0002020202020200) * 0x0001020408102000 >> 57] & (P & 0x0202020202020202) * 0x0081020408102040 >> 56;
	index_v = FLIPPED[5][index_v];
	flipped = B2B7[index_v];

	index_h = OUTFLANK[1][(O >> 41) & 0x3f] & (P >> 40);
	flipped |= ((unsigned long long) FLIPPED[1][index_h]) << 41;

	index_d = OUTFLANK[5][(((O & 0x0004020408102000ULL) + 0x007c7e7c78706000ULL) & 0x8080808080808080ULL) * 0x0002040810204081ULL >> 57] & (((P & 0x0804020408102040ULL) + 0x787c7e7c78706040ULL) & 0x8080808080808080ULL) * 0x0002040810204081ULL >> 56;
	index_d = FLIPPED[5][index_d];
	flipped |= F2B6C7[index_d];


	return flipped;
}

/**
 * Compute flipped discs when playing on square C6.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_C6(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7;
	register unsigned long long flipped;

	index_v = OUTFLANK[5][(O & 0x0004040404040400) * 0x0000810204081000 >> 57] & (P & 0x0404040404040404) * 0x0040810204081020 >> 56;
	index_v = FLIPPED[5][index_v];
	flipped = C2C7[index_v];

	index_h = OUTFLANK[2][(O >> 41) & 0x3f] & (P >> 40);
	flipped |= ((unsigned long long) FLIPPED[2][index_h]) << 41;

	index_d7 = OUTFLANK[2][(O & 0x0002040810204000ULL)* 0x0101010101010101ULL >> 57] & (P & 0x0102040810204080ULL) * 0x0101010101010101ULL >> 56;
	index_d7 = FLIPPED[2][index_d7];
	flipped |= G2B7[index_d7];

	flipped |= ((P >> 9) & 0x0008000000000000ULL & O) | ((P << 9) & 0x0000000200000000ULL & O);


	return flipped;
}

/**
 * Compute flipped discs when playing on square D6.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_D6(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[5][(O & 0x0008080808080800) * 0x0000408102040800 >> 57] & (P & 0x0808080808080808) * 0x0020408102040810 >> 56;
	index_v = FLIPPED[5][index_v];
	flipped = D2D7[index_v];

	index_h = OUTFLANK[3][(O >> 41) & 0x3f] & (P >> 40);
	flipped |= ((unsigned long long) FLIPPED[3][index_h]) << 41;

	index_d7 = OUTFLANK[3][(O & 0x0004081020400000ULL)* 0x0101010101010101ULL >> 57] & (P & 0x0204081020408000ULL) * 0x0101010101010101ULL >> 56;
	index_d7 = FLIPPED[3][index_d7];
	flipped |= G3C7[index_d7 >> 1];

	index_d9 = OUTFLANK[3][(O & 0x0010080402000000ULL)* 0x0101010101010101ULL >> 57] & (P & 0x2010080402010000ULL) * 0x0101010101010101ULL >> 56;
	index_d9 = FLIPPED[3][index_d9];
	flipped |= B4E7[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square E6.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_E6(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[5][(O & 0x0010101010101000) * 0x0000204081020400 >> 57] & (P & 0x1010101010101010) * 0x0010204081020408 >> 56;
	index_v = FLIPPED[5][index_v];
	flipped = E2E7[index_v];

	index_h = OUTFLANK[4][(O >> 41) & 0x3f] & (P >> 40);
	flipped |= ((unsigned long long) FLIPPED[4][index_h]) << 41;

	index_d7 = OUTFLANK[4][(O & 0x0008102040000000ULL)* 0x0101010101010101ULL >> 57] & (P & 0x0408102040800000ULL) * 0x0101010101010101ULL >> 56;
	index_d7 = FLIPPED[4][index_d7];
	flipped |= G4D7[index_d7 >> 2];

	index_d9 = OUTFLANK[4][(O & 0x0020100804020000ULL)* 0x0101010101010101ULL >> 57] & (P & 0x4020100804020100ULL) * 0x0101010101010101ULL >> 56;
	index_d9 = FLIPPED[4][index_d9];
	flipped |= B3F7[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square F6.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_F6(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[5][(O & 0x0020202020202000) * 0x0000102040810200 >> 57] & (P & 0x2020202020202020) * 0x0008102040810204 >> 56;
	index_v = FLIPPED[5][index_v];
	flipped = F2F7[index_v];

	index_h = OUTFLANK[5][(O >> 41) & 0x3f] & (P >> 40);
	flipped |= ((unsigned long long) FLIPPED[5][index_h]) << 41;

	flipped |= ((P >> 7) & 0x0010000000000000ULL & O) | ((P << 7) & 0x0000004000000000ULL & O);

	index_d9 = OUTFLANK[5][(O & 0x0040201008040200ULL)* 0x0101010101010101ULL >> 57] & (P & 0x8040201008040201ULL) * 0x0101010101010101ULL >> 56;
	index_d9 = FLIPPED[5][index_d9];
	flipped |= B2G7[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square G6.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_G6(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d;
	register unsigned long long flipped;

	index_v = OUTFLANK[5][(O & 0x0040404040404000) * 0x0000081020408100 >> 57] & (P & 0x4040404040404040) * 0x0004081020408102 >> 56;
	index_v = FLIPPED[5][index_v];
	flipped = G2G7[index_v];

	index_h = OUTFLANK[6][(O >> 41) & 0x3f] & (P >> 40);
	flipped |= ((unsigned long long) FLIPPED[6][index_h]) << 41;

	index_d = OUTFLANK[5][(((O & 0x0020402010080400ULL) + 0x0060406070787c00ULL) & 0x8080808080808080ULL) * 0x0002040810204081ULL >> 57] & (((P & 0x1020402010080402ULL) + 0x7060406070787c7eULL) & 0x8080808080808080ULL) * 0x0002040810204081ULL >> 56;
	index_d = FLIPPED[5][index_d];
	flipped |= C2G6F7[index_d];


	return flipped;
}

/**
 * Compute flipped discs when playing on square H6.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_H6(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d;
	register unsigned long long flipped;

	index_v = OUTFLANK[5][(O & 0x0080808080808000) * 0x0000040810204080 >> 57] & (P & 0x8080808080808080) * 0x0002040810204081 >> 56;
	index_v = FLIPPED[5][index_v];
	flipped = H2H7[index_v];

	index_h = OUTFLANK[7][(O >> 41) & 0x3f] & (P >> 40);
	flipped |= ((unsigned long long) FLIPPED[7][index_h]) << 41;

	index_d = OUTFLANK[5][(((O & 0x0040804020100800ULL) + 0x0040004060707800ULL) & 0x8080808080808080ULL) * 0x0002040810204081ULL >> 57] & (((P & 0x2040804020100804ULL) + 0x604000406070787cULL) & 0x8080808080808080ULL) * 0x0002040810204081ULL >> 56;
	index_d = FLIPPED[5][index_d];
	flipped |= D2H6G7[index_d];


	return flipped;
}

/**
 * Compute flipped discs when playing on square A7.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_A7(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7;
	register unsigned long long flipped;

	index_v = OUTFLANK[6][(O & 0x0001010101010100) * 0x0002040810204000 >> 57] & (P & 0x0101010101010101) * 0x0102040810204080 >> 56;
	index_v = FLIPPED[6][index_v];
	flipped = A2A7[index_v];

	index_h = OUTFLANK[0][(O >> 49) & 0x3f] & (P >> 48);
	flipped |= ((unsigned long long) FLIPPED[0][index_h]) << 49;

	index_d7 = OUTFLANK[0][(O & 0x0000020408102000ULL)* 0x0101010101010101ULL >> 57] & (P & 0x0001020408102040ULL) * 0x0101010101010101ULL >> 56;
	index_d7 = FLIPPED[0][index_d7];
	flipped |= F2B6[index_d7];


	return flipped;
}

/**
 * Compute flipped discs when playing on square B7.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_B7(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7;
	register unsigned long long flipped;

	index_v = OUTFLANK[6][(O & 0x0002020202020200) * 0x0001020408102000 >> 57] & (P & 0x0202020202020202) * 0x0081020408102040 >> 56;
	index_v = FLIPPED[6][index_v];
	flipped = B2B7[index_v];

	index_h = OUTFLANK[1][(O >> 49) & 0x3f] & (P >> 48);
	flipped |= ((unsigned long long) FLIPPED[1][index_h]) << 49;

	index_d7 = OUTFLANK[1][(O & 0x0002040810204000ULL)* 0x0101010101010101ULL >> 57] & (P & 0x0102040810204080ULL) * 0x0101010101010101ULL >> 56;
	index_d7 = FLIPPED[1][index_d7];
	flipped |= G2B7[index_d7];


	return flipped;
}

/**
 * Compute flipped discs when playing on square C7.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_C7(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d;
	register unsigned long long flipped;

	index_v = OUTFLANK[6][(O & 0x0004040404040400) * 0x0000810204081000 >> 57] & (P & 0x0404040404040404) * 0x0040810204081020 >> 56;
	index_v = FLIPPED[6][index_v];
	flipped = C2C7[index_v];

	index_h = OUTFLANK[2][(O >> 49) & 0x3f] & (P >> 48);
	flipped |= ((unsigned long long) FLIPPED[2][index_h]) << 49;

	index_d = OUTFLANK[2][(O & 0x00040a1020400000ULL) * 0x0101010101010101ULL >> 57] & (P & 0x00040a1120408000ULL) * 0x0101010101010101ULL >> 56;
	index_d = FLIPPED[2][index_d];
	flipped |= B6C7G3[index_d];


	return flipped;
}

/**
 * Compute flipped discs when playing on square D7.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_D7(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d;
	register unsigned long long flipped;

	index_v = OUTFLANK[6][(O & 0x0008080808080800) * 0x0000408102040800 >> 57] & (P & 0x0808080808080808) * 0x0020408102040810 >> 56;
	index_v = FLIPPED[6][index_v];
	flipped = D2D7[index_v];

	index_h = OUTFLANK[3][(O >> 49) & 0x3f] & (P >> 48);
	flipped |= ((unsigned long long) FLIPPED[3][index_h]) << 49;

	index_d = OUTFLANK[3][(O & 0x0008142240000000ULL) * 0x0101010101010101ULL >> 57] & (P & 0x0008142241800000ULL) * 0x0101010101010101ULL >> 56;
	index_d = FLIPPED[3][index_d];
	flipped |= B5D7G4[index_d];


	return flipped;
}

/**
 * Compute flipped discs when playing on square E7.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_E7(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d;
	register unsigned long long flipped;

	index_v = OUTFLANK[6][(O & 0x0010101010101000) * 0x0000204081020400 >> 57] & (P & 0x1010101010101010) * 0x0010204081020408 >> 56;
	index_v = FLIPPED[6][index_v];
	flipped = E2E7[index_v];

	index_h = OUTFLANK[4][(O >> 49) & 0x3f] & (P >> 48);
	flipped |= ((unsigned long long) FLIPPED[4][index_h]) << 49;

	index_d = OUTFLANK[4][(O & 0x0010284402000000ULL) * 0x0101010101010101ULL >> 57] & (P & 0x0010284482010000ULL) * 0x0101010101010101ULL >> 56;
	index_d = FLIPPED[4][index_d];
	flipped |= B4E7G5[index_d];


	return flipped;
}

/**
 * Compute flipped discs when playing on square F7.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_F7(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d;
	register unsigned long long flipped;

	index_v = OUTFLANK[6][(O & 0x0020202020202000) * 0x0000102040810200 >> 57] & (P & 0x2020202020202020) * 0x0008102040810204 >> 56;
	index_v = FLIPPED[6][index_v];
	flipped = F2F7[index_v];

	index_h = OUTFLANK[5][(O >> 49) & 0x3f] & (P >> 48);
	flipped |= ((unsigned long long) FLIPPED[5][index_h]) << 49;

	index_d = OUTFLANK[5][(O & 0x0020500804020000ULL) * 0x0101010101010101ULL >> 57] & (P & 0x0020508804020100ULL) * 0x0101010101010101ULL >> 56;
	index_d = FLIPPED[5][index_d];
	flipped |= B3F7G6[index_d];


	return flipped;
}

/**
 * Compute flipped discs when playing on square G7.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_G7(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[6][(O & 0x0040404040404000) * 0x0000081020408100 >> 57] & (P & 0x4040404040404040) * 0x0004081020408102 >> 56;
	index_v = FLIPPED[6][index_v];
	flipped = G2G7[index_v];

	index_h = OUTFLANK[6][(O >> 49) & 0x3f] & (P >> 48);
	flipped |= ((unsigned long long) FLIPPED[6][index_h]) << 49;

	index_d9 = OUTFLANK[6][(O & 0x0040201008040200ULL)* 0x0101010101010101ULL >> 57] & (P & 0x8040201008040201ULL) * 0x0101010101010101ULL >> 56;
	index_d9 = FLIPPED[6][index_d9];
	flipped |= B2G7[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square H7.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_H7(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[6][(O & 0x0080808080808000) * 0x0000040810204080 >> 57] & (P & 0x8080808080808080) * 0x0002040810204081 >> 56;
	index_v = FLIPPED[6][index_v];
	flipped = H2H7[index_v];

	index_h = OUTFLANK[7][(O >> 49) & 0x3f] & (P >> 48);
	flipped |= ((unsigned long long) FLIPPED[7][index_h]) << 49;

	index_d9 = OUTFLANK[7][(O & 0x0080402010080400ULL)* 0x0101010101010101ULL >> 57] & (P & 0x0080402010080402ULL) * 0x0101010101010101ULL >> 56;
	index_d9 = FLIPPED[7][index_d9];
	flipped |= C2G6[index_d9 >> 1];


	return flipped;
}

/**
 * Compute flipped discs when playing on square A8.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_A8(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7;
	register unsigned long long flipped;

	index_v = OUTFLANK[7][(O & 0x0001010101010100) * 0x0002040810204000 >> 57] & (P & 0x0101010101010101) * 0x0102040810204080 >> 56;
	index_v = FLIPPED[7][index_v];
	flipped = A2A7[index_v];

	index_h = OUTFLANK[0][(O >> 57) & 0x3f] & (P >> 56);
	flipped |= ((unsigned long long) FLIPPED[0][index_h]) << 57;

	index_d7 = OUTFLANK[0][(O & 0x0002040810204000ULL)* 0x0101010101010101ULL >> 57] & (P & 0x0102040810204080ULL) * 0x0101010101010101ULL >> 56;
	index_d7 = FLIPPED[0][index_d7];
	flipped |= G2B7[index_d7];


	return flipped;
}

/**
 * Compute flipped discs when playing on square B8.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_B8(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7;
	register unsigned long long flipped;

	index_v = OUTFLANK[7][(O & 0x0002020202020200) * 0x0001020408102000 >> 57] & (P & 0x0202020202020202) * 0x0081020408102040 >> 56;
	index_v = FLIPPED[7][index_v];
	flipped = B2B7[index_v];

	index_h = OUTFLANK[1][(O >> 57) & 0x3f] & (P >> 56);
	flipped |= ((unsigned long long) FLIPPED[1][index_h]) << 57;

	index_d7 = OUTFLANK[1][(O & 0x0004081020400000ULL)* 0x0101010101010101ULL >> 57] & (P & 0x0204081020408000ULL) * 0x0101010101010101ULL >> 56;
	index_d7 = FLIPPED[1][index_d7];
	flipped |= G3C7[index_d7 >> 1];


	return flipped;
}

/**
 * Compute flipped discs when playing on square C8.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_C8(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d;
	register unsigned long long flipped;

	index_v = OUTFLANK[7][(O & 0x0004040404040400) * 0x0000810204081000 >> 57] & (P & 0x0404040404040404) * 0x0040810204081020 >> 56;
	index_v = FLIPPED[7][index_v];
	flipped = C2C7[index_v];

	index_h = OUTFLANK[2][(O >> 57) & 0x3f] & (P >> 56);
	flipped |= ((unsigned long long) FLIPPED[2][index_h]) << 57;

	index_d = OUTFLANK[2][(O & 0x040a102040000000ULL) * 0x0101010101010101ULL >> 57] & (P & 0x040a112040800000ULL) * 0x0101010101010101ULL >> 56;
	index_d = FLIPPED[2][index_d];
	flipped |= B7C8G4[index_d];


	return flipped;
}

/**
 * Compute flipped discs when playing on square D8.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_D8(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d;
	register unsigned long long flipped;

	index_v = OUTFLANK[7][(O & 0x0008080808080800) * 0x0000408102040800 >> 57] & (P & 0x0808080808080808) * 0x0020408102040810 >> 56;
	index_v = FLIPPED[7][index_v];
	flipped = D2D7[index_v];

	index_h = OUTFLANK[3][(O >> 57) & 0x3f] & (P >> 56);
	flipped |= ((unsigned long long) FLIPPED[3][index_h]) << 57;

	index_d = OUTFLANK[3][(O & 0x0814224000000000ULL) * 0x0101010101010101ULL >> 57] & (P & 0x0814224180000000ULL) * 0x0101010101010101ULL >> 56;
	index_d = FLIPPED[3][index_d];
	flipped |= B6D8G5[index_d];


	return flipped;
}

/**
 * Compute flipped discs when playing on square E8.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_E8(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d;
	register unsigned long long flipped;

	index_v = OUTFLANK[7][(O & 0x0010101010101000) * 0x0000204081020400 >> 57] & (P & 0x1010101010101010) * 0x0010204081020408 >> 56;
	index_v = FLIPPED[7][index_v];
	flipped = E2E7[index_v];

	index_h = OUTFLANK[4][(O >> 57) & 0x3f] & (P >> 56);
	flipped |= ((unsigned long long) FLIPPED[4][index_h]) << 57;

	index_d = OUTFLANK[4][(O & 0x1028440200000000ULL) * 0x0101010101010101ULL >> 57] & (P & 0x1028448201000000ULL) * 0x0101010101010101ULL >> 56;
	index_d = FLIPPED[4][index_d];
	flipped |= B5E8G6[index_d];


	return flipped;
}

/**
 * Compute flipped discs when playing on square F8.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_F8(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d;
	register unsigned long long flipped;

	index_v = OUTFLANK[7][(O & 0x0020202020202000) * 0x0000102040810200 >> 57] & (P & 0x2020202020202020) * 0x0008102040810204 >> 56;
	index_v = FLIPPED[7][index_v];
	flipped = F2F7[index_v];

	index_h = OUTFLANK[5][(O >> 57) & 0x3f] & (P >> 56);
	flipped |= ((unsigned long long) FLIPPED[5][index_h]) << 57;

	index_d = OUTFLANK[5][(O & 0x2050080402000000ULL) * 0x0101010101010101ULL >> 57] & (P & 0x2050880402010000ULL) * 0x0101010101010101ULL >> 56;
	index_d = FLIPPED[5][index_d];
	flipped |= B4F8G7[index_d];


	return flipped;
}

/**
 * Compute flipped discs when playing on square G8.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_G8(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[7][(O & 0x0040404040404000) * 0x0000081020408100 >> 57] & (P & 0x4040404040404040) * 0x0004081020408102 >> 56;
	index_v = FLIPPED[7][index_v];
	flipped = G2G7[index_v];

	index_h = OUTFLANK[6][(O >> 57) & 0x3f] & (P >> 56);
	flipped |= ((unsigned long long) FLIPPED[6][index_h]) << 57;

	index_d9 = OUTFLANK[6][(O & 0x4020100804020000ULL)* 0x0101010101010101ULL >> 57] & (P & 0x4020100804020100ULL) * 0x0101010101010101ULL >> 56;
	index_d9 = FLIPPED[6][index_d9];
	flipped |= B3F7[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square H8.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_H8(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[7][(O & 0x0080808080808000) * 0x0000040810204080 >> 57] & (P & 0x8080808080808080) * 0x0002040810204081 >> 56;
	index_v = FLIPPED[7][index_v];
	flipped = H2H7[index_v];

	index_h = OUTFLANK[7][(O >> 57) & 0x3f] & (P >> 56);
	flipped |= ((unsigned long long) FLIPPED[7][index_h]) << 57;

	index_d9 = OUTFLANK[7][(O & 0x8040201008040200ULL)* 0x0101010101010101ULL >> 57] & (P & 0x8040201008040201ULL) * 0x0101010101010101ULL >> 56;
	index_d9 = FLIPPED[7][index_d9];
	flipped |= B2G7[index_d9];


	return flipped;
}

/**
 * Compute (zero-) flipped discs when plassing.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_pass(const unsigned long long P, const unsigned long long O)
{
	(void) P; // useless code to shut-up compiler warning
	(void) O;
	return 0;
}


/** Array of functions to compute flipped discs */
unsigned long long (*flip[])(const unsigned long long, const unsigned long long) = {
	flip_A1, flip_B1, flip_C1, flip_D1,
	flip_E1, flip_F1, flip_G1, flip_H1,
	flip_A2, flip_B2, flip_C2, flip_D2,
	flip_E2, flip_F2, flip_G2, flip_H2,
	flip_A3, flip_B3, flip_C3, flip_D3,
	flip_E3, flip_F3, flip_G3, flip_H3,
	flip_A4, flip_B4, flip_C4, flip_D4,
	flip_E4, flip_F4, flip_G4, flip_H4,
	flip_A5, flip_B5, flip_C5, flip_D5,
	flip_E5, flip_F5, flip_G5, flip_H5,
	flip_A6, flip_B6, flip_C6, flip_D6,
	flip_E6, flip_F6, flip_G6, flip_H6,
	flip_A7, flip_B7, flip_C7, flip_D7,
	flip_E7, flip_F7, flip_G7, flip_H7,
	flip_A8, flip_B8, flip_C8, flip_D8,
	flip_E8, flip_F8, flip_G8, flip_H8,
	flip_pass, flip_pass
};

